SALES: 1-800-867-1380

Azure AD Graph API Common Queries

Updated: April 21, 2014

This topic lists common queries that can be used with the Azure AD Graph. For more information about supported operations when querying the Graph, see Supported Queries, Filters, and Paging Options in Azure AD Graph API.

The queries below all address the tenant using a domain name. You can replace with one of your tenant’s registered domain names to successfully run the queries against your subscription. For information about other ways of addressing the tenant, see Addressing Entities and Operations in the Graph API.

The following common queries demonstrate how to access top-level resources in the Graph using as the example tenant.


Top-Level Resources Query Results URI (for

Top-level resources

Returns URI list of the top-level resources for directory services (also listed below)

Company information

Returns company information


Returns contact information


Returns user information


Returns group data


Returns all roles that have users or groups assigned to them


Returns the tenant's subscriptions

Directory metadata

Returns a Service Metadata Document that describes the data model (that is, structure and organization of directory resources)$metadata?api-version=2013-04-05

The following common queries demonstrate how to perform a query operation in the Graph using as the example tenant.


Query Operation URI (for

List all Users and Groups

Retrieve individual User by specifying the objectId or userPrincipalName

Request and Filter for a user with displayName equal to “Jon Doe”$filter=displayName eq 'Jon Doe'&api-version=2013-04-05

Request and Filter for specific users with firstName equal to “Jon”$filter=givenName eq 'Jon'&api-version=2013-04-05

Filter for givenName and surname values.$filter=givenName eq 'Jon' and surname eq 'Doe'&api-version=2013-04-05

Retrieve individual group by specifying the objectId

Retrieve a user’s manager

Retrieve a user’s direct reports list

Retrieve a list of links to a user’s direct reports$links/directReports?api-version=2013-04-05

Retrieve membership list of a group

Retrieve a list of links to the members of a group.$links/members?api-version=2013-04-05

Retrieve a user’s group membership (not transitive)

Retrieve a list of the groups that the user is a member of (not transitive)$links/memberOf?api-version=2013-04-05

Request and filter for groups with displayName => ‘az’ and <= ‘dz’$filter=displayName ge 'az' and displayName le 'dz'&api-version=2013-04-05

White space in the query string should be URL-encoded before sending a request. For example, the following query string,$filter=displayName eq 'Jon Doe'&api-version=2013-04-05, should be URL encoded as:$filter=displayName%20eq%20'Jon%20Doe'&api-version=2013-04-05.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft