Thank you for posting this in Microsoft Q&A.
I understand you are encountering an AuthenticationFailedException while connecting to Azure AD. You are using an ASP.NET (C#) application and the Microsoft Graph API to retrieve user information.
The error message suggests that there may be an issue with the authentication credentials or permissions.
1.Check the authentication credentials: Ensure that the tenantId
, clientId
, and clientSecret
values are correct. These values are used to authenticate the application with Azure AD.
2.Check your application have user.Read
delegated permissions.
Select your application -> API permissions.
3.Once you will get the access token with correct audience(https://graph.microsoft.com), access token needs to pass as bearer token in the authorization header to get the user's details.
Hope this helps. Do let us know if you any further queries.
Thanks,
Navya.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.