cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TimRobinson33
Regular Visitor

can't retrieve data from "AAD Users" when authenticated using client credentials flow

Hello,

 

I have built a server-to-server app which accesses the Dataverse API using the oAuth client credentials flow, and my Dataverse application user has "system administrator" level privileges in Dataverse

 

I can access any tables except AAD Users:

 

GET https://xxxxx.crm11.dynamics.com/api/data/v9.0/aadusers

Microsoft.Crm.CrmException: AccessToken not found
at Microsoft.Crm.ObjectModel.OboTokenProvider.<>c__DisplayClass5_0.<GetOBOToken>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at Microsoft.Crm.Sandbox.Service.PluginSecureStoreServiceProvider.<>c__DisplayClass37_0.<OnBehalfOfTokenServiceProviderAcquireToken>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TRes...).\"}}", :trace-redirects []}

 

If I execute the exact same query from my web browser which is logged in as a normal user, it works fine.

 

2 REPLIES 2
HNKRezende
New Member

Hi @TimRobinson33 !

 

Do you solved this problem?
I have the same case here... 😕

No I'm afraid not. I also tried to access AD directly using MS graph but ran into some other permission problems and ended up using a third party product called Data Synchronisation Studio to copy fields from AD into the system users table

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,468)