0

I want to get user and group details from azure graph api. but I don't know how to get those data's.

I have a angular 8 application, it is running in azure app services it is using AAD authentication, so when i call my app service URL (https://*********.azurewebsites.net) it is redirect to azure login page. once i was logged in I want to get access token to access graph API, I was tried MSAL, and adal-angular4 js for generate access token. but both are having login function it popup the login page again.

I dont know how to do that please any one help me.

Manihtraa
  • 968
  • 3
  • 12
  • 28

1 Answers1

0

There are multiple question being asked in this topic so i am gonna cover it in very short answer:

With the Microsoft identity platform endpoint, you can sign users into your single-page apps with both personal and work or school accounts from Microsoft.

  • Create a dot net Core Web API which will be secure by Azure AD.You can use Access token which you get in above steps.

  • Now Create a method in your web api to fetch User and group details

  • Pass the access token which you retrieved it from above steps.

  • Implement all your required method in Web API which will communicate using client credentials.

For additional reference , please check below links:

https://odetocode.com/blogs/scott/archive/2018/02/21/managing-azure-ad-group-claims-in-asp-net-core.aspx

Overall flow would look like below:

enter image description here

For detailed example please check :

https://learn.microsoft.com/en-us/azure/active-directory/develop/sample-v2-code

Mohit Verma
  • 5,140
  • 2
  • 12
  • 27