The user or administrator has not consented to use the application-Send interactive authorization request

0 votes

We're doing this CRM Web API project. The project logs-into Dynamics CRM online instance and gets the list of accounts.

The login seems to be happening fine. However, the accounts listing is giving the below error:

AADSTS65001: The user or administrator has not consented to use the application with ID 'xxxx-xxxxx-xxxx-xxx'. Send an interactive authorization request for this user and resource. Trace ID: e3b360d6-39fb-4e61-87d9-26531f30fd7b Correlation ID: 9b2cff0c-074e-44fe-a169-77c8061a7312 Timestamp: 2016-10-18 10:12:49Z

The permissions are properly set:

image

What is the problem?

Aug 23, 2018 in Azure by null_void
• 3,220 points
166 views

1 answer to this question.

0 votes

An admin must consent to the permissions. You should make an authorization request to Azure AD that includes the parameter prompt=admin_consent.

As in the documentation here, the prompt parameter can have 3 values: login, consent, or admin_consent.

So, you should go to a URL such as https://login.microsoftonline.com/tenant-id/oauth2/authorize?client_id=app-client-id&redirect_uri=encoded-reply-url&response_type=code&prompt=admin_consent.

Replace tenant-id with your Azure AD tenant id/domain name, or common if your app is multi-tenant. Replace app-client-id with your app's client id. Replace encoded-reply-url with a URL-encoded reply URL of your app.

An easier way of constructing the URL you need is to go through authentication and just grab the URL in the address bar when you hit Azure AD. Then just add &prompt=admin_consent to the URL.

NOTE: With the newest update to the Azure Portal came the ability to grant permissions from the portal directly.

If you go to Azure Active Directory in the new portal, find your app registration there and click Grant Permissions under the Required permissions blade.

image

answered Aug 23, 2018 by club_seesharp
• 3,450 points

Related Questions In Azure

0 votes
1 answer

Error: The subscription is not registered to use namespace 'Microsoft.DataFactory

In Azure, for each functionality there's a ...READ MORE

answered Aug 24, 2018 in Azure by null_void
• 3,220 points
46 views
0 votes
1 answer

Not being able to get user consent - OAuth2 with AzureAD

The problem you are running in to ...READ MORE

answered Jun 8, 2018 in Azure by cloudie_crank
• 1,610 points
83 views
0 votes
1 answer

Why as a co-administrator of a subscription am I unable to edit the Active Directory?

The answer was that I needed to ...READ MORE

answered Aug 22, 2018 in Azure by null_void
• 3,220 points
19 views
0 votes
1 answer
0 votes
1 answer

I want to detect whether a request is being made over HTTPS or HTTP on Azure Websites.

It's looking like you can make use of ...READ MORE

answered Apr 2 in Azure by Prerna
• 1,940 points
27 views
+1 vote
4 answers

Where to find the Microsoft.IdentityModel dll?

I finally found this Nuget package: https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM, which ...READ MORE

answered Oct 23, 2018 in Azure by Trisha
345 views
0 votes
1 answer

Why would you choose Blob Storage over File Storage which also has ability to store file(s) and folder(s)

Azure Files: Azure File storage provides shared ...READ MORE

answered Apr 13, 2018 in Azure by null_void
• 3,220 points

edited Apr 13, 2018 by null_void 39 views
+1 vote
2 answers

Not able to ping AWS EC2 Instance

The custom ICMP rule in the security ...READ MORE

answered Apr 17, 2018 in Azure by Cloud gunner
• 4,260 points
489 views
0 votes
2 answers

How can I download a .vhd image to my local machine from azure and upload the same to a different azure account?

From the Windows Azure Portal you can ...READ MORE

answered Aug 20, 2018 in Azure by Priyaj
• 56,160 points
1,144 views
0 votes
1 answer

How can I remove/hide/disable excessive HTTP response headers in Azure/IIS7 without having to use UrlScan?

MSDN published an article on how to ...READ MORE

answered May 21, 2018 in Azure by club_seesharp
• 3,450 points
370 views