web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

The user or administrator has not consented to use the application with ID '<APPID>'

(0) ShareShare
ReportReport
Posted on by

We started having this problem shortly after we started using DYN365O Update 3. Our code worked for a while then one day in mid-January stopped working. The following error happens when our code tries to connect:

Response Code (1004) {"error":"AADSTS65001: The user or administrator has not consented to use the application with ID '<APPID>'. Send an interactive authorization request for this user and resource.\r\nTrace ID: d1775f71-ac60-4d12-ace5-39b52452a5c7\r\nCorrelation ID: 38e3b5c6-52c2-4ea9-9ad1-67230e246b40\r\nTimestamp: 2017-01-29 21:42:43Z"}

I was able to use the code here (github.com/.../Dynamics-AX-Integration) to recreate the problem.

1. When pointing to our Update 2 (August Update) DYN365O instance everything works perfectly.

2. Changing the URI to point to Update3 we begin to see these errors.

 

I have searched the internet and I have done everything suggested including:

1. Setting oauth2AllowImplicitFlow = true in the manifest for the Azure App.

2. Under permissions for the APP in AAD I have used the Grant Permissions to "grant permissions for all accounts in the directory".

3. Altering the call to AcquireTokenAsync to include "prompt=admin_consent". I am presented with the prompt screen but even after entering the AAD admin userid/password I get the same error.

  a. Tried other users.

4. Verified that the user in DYN365O (under System Administration >> Users) is identical in both our Update 2 and Update 3 instances.

*This post is locked for comments

I have the same question (0)
  • JoeBrewer Profile Picture
    692 on at

    Hi Michael

    Did you solve this issue? I am having the same problem.

    Thanks,

    Joe

  • Michael Morin Profile Picture
    on at

    Hi Joe,

     Good news. Yes. See the code below. I was able to modify the code above with this. When I did that, it brought up the login. Once I entered the AAD Admin userid and password the app had consent and I never need to enter it again.

    using Microsoft.IdentityModel.Clients.ActiveDirectory;

    AuthenticationContext context = new AuthenticationContext("https://login.windows.net/&lt;DOMAIN>.com", TokenCache.DefaultShared);

    AuthenticationResult result = context.AcquireTokenAsync(

       "https://<DOMAIN>.devaos.sandbox.ax.dynamics.com",

       "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", // app ID

       new Uri("http://<REDIRECT>"), // Redirect URI on the registered app

       new PlatformParameters(PromptBehavior.Auto)

       ).Result;

  • Patrick O'Gorman Profile Picture
    166 on at

    Hey Michael, thanks for posting this. Can you tell me what framework you're targeting, or more specifically what ns do PlatformParameters belong to? I've pulled Microsoft.IdentityModel.Clients.ActiveDirectory, but don't see this type. 

    Thanks very much.

  • Patrick O'Gorman Profile Picture
    166 on at

    Disregard Michael, thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans