How to handle the error "Could not grant admin consent. Your organization does not have a subscription (or service principal) for the following API(s): Dynamics ERP" in Azure Portal


 

If you are an RnD minded developer, any time in your life you must have faced this situation:

You needed to perform some POCs on Azure App registrations in your trial Azure instance. You are using a trial Azure sign up instance, using your credit card. You needed to let your Azure App to grant access to Dynamics ERP. So you went to Azure App registrations --> API permissions and Grant admin consent for default directory:


But uh-oh, snap!!! You got this error: Could not grant admin consent. Your organization does not have a subscription (or service principal) for the following API(s): Dynamics ERP.

You googled and found out this happens, when you are not a 'Global administrator'. You checked from Azure Directory users' privileges. Yes, you're already a global admin.

Then? What happened? What is causing this error? 

The following steps, could help you in resolving the same. Read along.

Step 1: visit the following site to set up a Premium P2 trial

https://learn.microsoft.com/en-us/answers/questions/542955/i-need-to-activate-free-trail-premium-p2-free-tria

Hereby you will be getting an 'youremail.onmicrosoft.com' which you will be using henceforth. For me the domain got created like this (details of which I received in my email):

You need to ensure user location is set by visiting your user details from Azure --> Active directory --> Users --> edit properties:




Step 2: Get Dynamics ERP product in your subscription

Now you need to bag the 'Dynamics ERP' product in your license. For this you need to visit Marketplace as under: https://admin.microsoft.com/#/subscriptions


Go to 'All products'  tab --> and search for Dynamics 365. It can be enabled as a trial, for a month, from here itself.

Step 3: Grant privileges to necessary software

Now you need to ascertain you have D365ERP, at least a trial version, enabled and activated on your subscription. For this, you need to visit: 

https://entra.microsoft.com/#view/Microsoft_AAD_UsersAndTenants/UserManagementMenuBlade/~/AllUsers

And browse to which user you want to assign the privilege, and select license from the left hand pane:



Abd then you can choose the software which you want assign:


Once this is done, you come back to Azure and try to grant admin consent now:



Comments

Popular posts from this blog

X++ : mistakes which developers commit the most

Make your menu items visible on main menu, conditionally,, using this cool feature of D365FO

Speed up your execution performance by using SysGlobalCaches