Unable to fetch profile photo

Copper Contributor

I have an Ionic app where I am using MSAL plugin https://www.npmjs.com/package/@azure/msal-angular to login the user and it is following https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow flow to get the Oauth2 token. When I am using that token as Bearer token to access the photo via https://graph.microsoft.com/v1.0/me/photo/$value I am getting the following error in Postman:-
{
"error": {
"code": "InvalidAuthenticationToken",
"message": "Access token validation failure. Invalid audience.",
"innerError": {
"request-id": "45adeff2-479b-48fb-b7af-0fb3f60f7620",
"date": "2020-04-24T08:56:29"
}
}
}
And when I am trying to use it via the app, I am getting 401 Unauthorized error.

1 Reply

Hi @SnehalJ1509, this techcommunity forum handles questions related to Microsoft Graph Security API. If you are experiencing an issue related to MSAL or Azure Active Directory authentication, please post a question on StackOverflow with tag MSAL or Azure-Active-Directory, or related techcommunity forums for better assistance. Thanks.