Addressing Entities and Operations in the Graph API
Updated: October 17, 2013
This topic discusses different addressing alternatives that you can use when addressing directory entities, calling directory functions, performing queries against the directory or performing operations on directory entities and resource sets using Graph. . For more detailed information about performing specific operations or queries, addressing directory entities, or calling functions, see the appropriate topic in this documentation.
For information about performing queries against the directory, see Azure AD Graph API Common Queries.
For information about directory entities and the operations that can be performed on them as well as about functions that are exposed by Graph, see the relevant topic in the Azure AD Graph REST API Reference.
You can address your tenant in one of three ways:
By tenant object ID. This is a GUID that was assigned when the tenant was created. It is equivalent to the objectId property of the TenantDetail object. The following URI shows how to query the top-level resources of a tenant’s directory by using the object ID: https://graph.windows.net/12345678-9abc-def0-1234-56789abcde?api-version=2013-04-05.
By verified (registered) domain name. This is one of the domain names that are registered for the tenant. These can be found in the verifiedDomains property of the TenantDetail object. The following URI shows how to query the top-level resources of a tenant that has the domain contoso.com: https://graph.windows.net/contoso.com?api-version=2013-04-05.
By using the “MyOrganization” alias. This alias is only available when using OAuth Authorization Code Grant type (3-legged) authentication. The alias is not case sensitive. It replaces the object ID or tenant domain in the URI. When the alias is used, Graph derives the tenant from the claims presented in the token attached to a request. The following URI shows how to query the top-level resources of a tenant using this alias: https://graph.windows.net/myorganization?api-version=2013-04-05.
Note The “MyOrganization” alias is not currently supported for differential queries.