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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Inserting data in Power Apps entity using Common Data Service

(0) ShareShare
ReportReport
Posted on by 8

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

I have the same question (0)
  • Suggested answer
    Linn Zaw Win Profile Picture
    3,407 on at

    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.

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/walkthrough-register-app-azure-active-directory

    After that, create the application user in the Settings area and

    https://docs.microsoft.com/en-us/power-platform/admin/create-users-assign-online-security-roles#create-an-application-user

    assign the security role to the application user

    https://docs.microsoft.com/en-us/power-platform/admin/create-users-assign-online-security-roles#assign-a-security-role-to-a-user

  • Power Platform Communities Profile Picture
    8 on at
    in your Azure App, have you added the CDS permissions in the API Permission tab of Azure AD?

    After adding permissions then you will need an admin to grant consent on that.
  • Power Platform Communities Profile Picture
    8 on at

    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

  • Power Platform Communities Profile Picture
    8 on at

    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.

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/walkthrough-register-app-azure-active-directory

    After that, create the application user in the Settings area and

    https://docs.microsoft.com/en-us/power-platform/admin/create-users-assign-online-security-roles#create-an-application-user

    assign the security role to the application user

    https://docs.microsoft.com/en-us/power-platform/admin/create-users-assign-online-security-roles#assign-a-security-role-to-a-user

  • Suggested answer
    Nishant Rana Profile Picture
    11,325 Microsoft Employee on at

    This might help

    nishantrana.me/.../

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 47 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans