Acquire a token and call the Microsoft Graph API by using a console app's identity - Error AADTSTS500113

Armisim99 1 Reputation point
2022-06-08T10:21:11.573+00:00

I am trying to following this tutorial:

console-app-quickstart

But when admin tries to grant admin consent for my application he gets this error:

209444-error.png

Which reply URL should I add to Redirect URIs in Azure? In the tutorial it is not indicated.

Thanks

Microsoft Security Microsoft Entra Microsoft Entra ID
Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2022-06-09T07:46:11.63+00:00

    Hi @Armisim99 ,

    Thanks for reaching out.

    I understand as you are working with console application which do not require user interaction. You are using application permission to access user's data which require Admin Consent.

    The error you are getting is due to no redirect URI has been configured while registering the application which is optional in this case.

    When you grant admin consent using https://login.microsoftonline.com/<tenantId>/adminconsent? If admin approves the permission for your application, the successful response would be sent on configured URI as below

    209659-image.png

    For this tutorial, you can ignore this error and verified that application permissions have been granted successfully in Azure portal by navigating to enterprise application.

    209725-image.png

    Once the application permission has been granted by admin, you will be able to run the application and access user's data.

    Hope this will help.

    Thanks,
    Shweta

    -------------------------------------------------------------------------------

    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.