Επεξεργασία

Κοινή χρήση μέσω


Azure Active Directory user table

Note

Azure Active Directory is now Microsoft Entra ID. Learn more

Microsoft Dataverse includes a virtual table named AAD user (aaduser). This virtual table provides a connection to Azure Active Directory (AAD) and returns data about users within your AAD organization. No virtual table configuration is required to use the functionality. This is an online only feature.

Note

Your results with AAD User may differ depending on where it is being used. AAD User in Dataverse will provide the full list of users on the Azure AD for the organization. AAD User in Dataverse for Teams is limited to providing all AAD Users who are also a member of the Team.

AAD User does not return groups or distribution lists.

Lookups using AADUser

You can easily add a lookup to this virtual table from within the Power Apps portal.

Create a lookup column with a related table of AADUser

Permissions

The AADUser table functions using Microsoft Graph. Users in your organization need to be assigned Graph permissions in order to view and use the AADUser virtual table.

Allowed operations

Only read and read-multiple operations are possible through the AADUser virtual table.

AADUser table Web API examples

This section contains HTTP GET examples for accessing data from the AADUser table.

Retrieving data

The following example demonstrate retrieving data from the AADUser table.

Retrieve all AADUser table rows

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers  

Retrieve AADUser records with surname 'admin'

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers?$filter=surname eq 'admin'

Retrieve AADUser records with surname 'admin' or 'admin02'

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers?$filter=(surname eq 'Admin02') or (surname eq 'Admin')

Retrieve AADUser records whose companyname is not null

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers?$filter=companyname ne null

Retrieve AADUser records whose usertype is 'Member'

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers?$filter=usertype eq 'Member'

Retrieve AADUser records whose businessphones contains is '123-555-1212'

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers?$filter=contains(businessphones, '123-555-1212')

Retrieve AADUser records whose givenname starts with 'test'

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers?$filter=startswith(givenname, 'test')

Retrieve AADUser records whose givenname does NOT starts with 'test'

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers?$filter=not startswith(givenname, 'test')

Retrieve related Account records that referencing an AADUser record

Below, new_aaduser_account is the name of the 1:N relationship between the AADUser and the Account entity.

https://[Organization URI].crm.dynamics.com/api/data/v9.1/aadusers(<user ID>)?$expand=new_aaduser_account($select=accountid,name)

Referencing an AADUser row

The following example demonstrates referencing an AADUser table row.

Set lookup field value referencing an AADUser row

In this example new_testaaduserId is the single-valued navigation property created with a custom 1:N relationship between AADUser and Account entity. The name of this navigation property is defined in the OneToManyRelationshipMetadata.ReferencingEntityNavigationPropertyName property of the relationship. More information: Single-valued navigation properties

PATCH
https://[Organization URI].crm.dynamics.com/api/data/v9.0/accounts(<account ID>)
{
  new_testaaduserId@odata.bind : "/aadusers(user ID)"
}

See also

aaduser table/entity reference
aaduser EntityType reference
Security and data access