cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
P3Sven
Advocate II
Advocate II

AAD User Table | Query per Odata or Dataverse Connector PBI

Hi lovely community,

 

just wondering why I can't query dataverse table "AAD User". 

Have sys admin role and can read all records "directly" via make.powerapps.com, but why not via API?

 

Is there another way to get all users of AAD User table or other?

I need all users incl. "company name" column? (unfortunately its not included in systemuser table)

 

P3Sven_1-1648490390782.png

 

BR,

Sven

 

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
dpoggemann
Super User
Super User

Hi @P3Sven ,

 

The systemuser table is the table in Dataverse with users.  I don't know of the AAD User table in Dataverse, the AAD user is is Azure Active Directory and I would expect you should utilize something like Power Automate to pull this information from AAD and augment as needed to the systemusers table in Dataverse.  


An example of a flow that is doing something similar:  https://2die4it.com/2020/09/02/get-set-manager-of-cds-d365-users-with-power-automate-flow/ 

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

View solution in original post

EricRegnier
Super User
Super User

Hi @P3Sven,

The issue with the Odata query you're trying is that your not authenticated. You'll need to pass the auth token somehow but I'm not sure how to with the Odata.Feed function. Even though your a system admin in Dataverse, AAD is another system/platform which required different privileges.

There is another way with the Office 365 User connector which will be simpler. Here's an example

EricRegnier_0-1648518778292.png

EricRegnier_1-1648518939271.png

 

More info: https://docs.microsoft.com/powerapps/maker/canvas-apps/connections/connection-office365-users?WT.mc_...

 

Hope this helps!

View solution in original post

NHelgren
Power Apps
Power Apps

We have just released the new AAD User virtual table. I'd based in Graph and uses OBO auth. With it you are able to retrieve AAD user data through the virtual table. Check out my recent post on it. 

New table in Dataverse - AADUser - Power Platform Community (microsoft.com)

View solution in original post

4 REPLIES 4
dpoggemann
Super User
Super User

Hi @P3Sven ,

 

The systemuser table is the table in Dataverse with users.  I don't know of the AAD User table in Dataverse, the AAD user is is Azure Active Directory and I would expect you should utilize something like Power Automate to pull this information from AAD and augment as needed to the systemusers table in Dataverse.  


An example of a flow that is doing something similar:  https://2die4it.com/2020/09/02/get-set-manager-of-cds-d365-users-with-power-automate-flow/ 

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew
EricRegnier
Super User
Super User

Hi @P3Sven,

The issue with the Odata query you're trying is that your not authenticated. You'll need to pass the auth token somehow but I'm not sure how to with the Odata.Feed function. Even though your a system admin in Dataverse, AAD is another system/platform which required different privileges.

There is another way with the Office 365 User connector which will be simpler. Here's an example

EricRegnier_0-1648518778292.png

EricRegnier_1-1648518939271.png

 

More info: https://docs.microsoft.com/powerapps/maker/canvas-apps/connections/connection-office365-users?WT.mc_...

 

Hope this helps!

P3Sven
Advocate II
Advocate II

Hi @dpoggemann , Hi @EricRegnier ,

 

thanks for your replies!

Also have wondered about AAD User Table but yes, I also guess it's another system with other authorization method.

 

I need to query all users incl. company name. I will create a new company name column in systemuser table and will update it with power automate via Office 365 connector..

 

Thank you!

 

BR,

Sven

NHelgren
Power Apps
Power Apps

We have just released the new AAD User virtual table. I'd based in Graph and uses OBO auth. With it you are able to retrieve AAD user data through the virtual table. Check out my recent post on it. 

New table in Dataverse - AADUser - Power Platform Community (microsoft.com)

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,003)