Reputation: 55
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
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
Reputation: 55
The below link helped me to solved. this is explained pretty clear
https://github.com/benbaran/adal-angular6-example
Upvotes: 1