cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
boca87
Level: Powered On

Get data from CDS via REST - Authentication error in combination with Azure AD

Hi everybody,

I've got a problem with getting data from Common Data Service and do really not know anymore how to continue. Propably it is really simple and I just forgot one small step, but I cannot find good documentation on my error.

 

I want one of my company's programs to access data stored in a custom CDS entity. I try to recreate every step here, so maybe there you can find the problem.

1. I created the custom entity

2. I registered an app in Azure Active Directory and gave it permissons (Attachment 1)
3. I try to test the API via Postman. First I obtain the Access token (Att. 2)

4. I use the GET Call with the generated Token (Att. 3)

 

As a result, I get the HTTP response 401 - Unauthorized with following Header:

 

Content-Type →text/html
Server →
WWW-Authenticate →Bearer error=invalid_token, error_description=Error during token validation!, authorization_uri=https://login.microsoftonline.com/[Azure Tenant ID]/oauth2/authorize, resource_id=https://[Org ID].api.crm4.dynamics.com/
x-ms-service-request-id →...
REQ_ID →...
x-authentication-ticketid →...
Date →Thu, 29 Nov 2018 08:44:14 GMT
Content-Length →49

 

I think the problem is, that I have to give the Azure App ID to the CDS, but I'm really stuck and don't know where to do it. I cannot add Application IDs to the Security Users.

 

Any pointers or solution would be greatly appreciated.

 

Best regards

Patrick 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Users Online
Currently online: 81 members 3,224 guests
Please welcome our newest community members: