In order to use Microsoft Graph your application needs to get an access token from the Microsoft Identity platform and attach the same token to the Graph request. This authentication flow is described here.
Also, for an Angular sample you can refer to the documentation.
Azure AD Out-of-the-box Authentication, ID Token & Access Token
Hi Experts,
I am using Azure AD Out-of-the-box Authentication. Login is successful.
https://working-angular-webapi.azurewebsites.net/.
Email: ******@jeanpaulvagmail.onmicrosoft.com Password: authentication1!
ID Token also found through URL:
https://working-angular-webapi.azurewebsites.net/.auth/me
However I need to get a Graph API Token also on behalf of User. I added the permission with "delegated" on Directory.Read.All for the AAD App Registration.
So using ID Token can I get a Silent Access Token from client-side or server-side?
(without Login prompt again)
What will be the code look like?
Thanks in advance.
1 answer
Sort by: Most helpful
-
Saurabh Sharma 23,826 Reputation points Microsoft Employee
2020-01-17T22:29:56.227+00:00