Hi Team,
We are consuming Common Data Service using Azure AD from C# Console Application to insert data in Power Apps Entity
1. We are trying to access Power Apps entities from C# Console App through Common Data Service.
2. We have registered the app on Azure AD.
3. We have the ClientID, TenantId, but when we try to insert the data into Power Apps entity using Common Data Service, we get the following error :
AADSTS65001: The user or administrator has not consented to use the application with ID '{client-id}' named '{application created in Azure AD}'. Send an interactive authorization request for this user and resource.
We have user consent in Azure AD app but when we try to access token, we still get the above error.
When I run this link in browser :
https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize?client_id={client-id}&response_type=code&redirect_uri={redirect_uri}&scope={scope}&prompt={prompt}
I replace the tenant-id, client-id, redirect_uri, scope and prompt, but I get "Need admin approval" popup for my work email address. Is there any other solution apart from tenant admin giving approval.
I have attached word document to explain what I am doing and what may I be missing.
Please help in addressing this issue.
Thanks,
Ashish Dhar
This might help
Is your work email address account has the Dynamics 365 administrator or Power Platform administrator role in Microsoft 365 admin center?
Please follow the steps 5-8 from the tutorial below to allow the application to access the API.
After that, create the application user in the Settings area and
assign the security role to the application user
you are trying to login with OAUTH? with Application ID you don't need this. using the CDS SDK you can put the application id and tenant id on the connection string and do the authentication
Is your work email address account has the Dynamics 365 administrator or Power Platform administrator role in Microsoft 365 admin center?
Please follow the steps 5-8 from the tutorial below to allow the application to access the API.
After that, create the application user in the Settings area and
assign the security role to the application user
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156