Hari Krishnan
Hari Krishnan

Reputation: 55

Angular 7 - Get logged in username after Azure AD authentication

I have hosted a new Angular 7 App in Azure app service. Also added Azure AD authentication for same based on https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad

the AD authentication is working (when i take site, it goes to microsoft login page and once login retruns back)

My issue now is how will be get the logged in username to show in UI? i searched many links but nothing that helps for a beginner like me. can anyone help me on this?

Upvotes: 2

Views: 3274

Answers (3)

Ritesh
Ritesh

Reputation: 1

You can use this.adalService.userInfo.profile.name to get the username for additional information you can check the responce here this.adalService.userInfo if you are using "adal-angular4" Module.

Upvotes: 0

Hari Krishnan
Hari Krishnan

Reputation: 55

The below link helped me to solved. this is explained pretty clear

https://github.com/benbaran/adal-angular6-example

Upvotes: 1

Kanchan Tyagi
Kanchan Tyagi

Reputation: 144

Have you looked into this Configure Azure Active Directory

Upvotes: 0

Related Questions