Share via


API endpoints of Office 365 operated by 21Vianet

Applies to: Office 365 for China operated by 21Vianet

For applications of Office 365 operated by 21Vianet in China, the API resources and related services have different URLs from those of other Office 365 offerings. These differences are documented as follows.

Microsoft Graph API

Applications that used Office 365 unified API can now upgrade to use Microsoft Graph(https://graph.microsoft.io/en-us/).

Service root endpoint

Microsoft Graph operated by 21Vianet Microsoft Graph
https://microsoftgraph.chinacloudapi.cn https://graph.microsoft.com

Microsoft Graph Explorer

Microsoft Graph operated by 21Vianet Microsoft Graph
https://graphexplorerchina.azurewebsites.net https://graphexplorer2.azurewebsites.net

Learn more about Microsoft Graph endpoints and service capabilities.

Azure Active Directory Graph API

Office 365 operated by 21Vianet Office 365
https://graph.chinacloudapi.cn https://graph.windows.net

Discovery Service API

Office 365 operated by 21Vianet Office 365
Not yet enabled https://api.office.com/discovery

Discovery service is not needed if calling Microsoft Graph (https://graph.microsoft.com/).

Calendar API

Office 365 operated by 21Vianet Office 365
https://partner.outlook.cn https://graph.microsoft.com

https://outlook.office.com

For example, to get a user's calendars using v2.0 of Office 365 operated by 21Vianet, submit a GET request to https://partner.outlook.cn/api/v2.0/me/calendars.

Contacts API

Office 365 operated by 21Vianet Office 365
https://partner.outlook.cn https://graph.microsoft.com

https://outlook.office.com

For example, to get a users' contacts using v2.0 of Office 365 operated by 21Vianet, submit a GET request to https://partner.outlook.cn/api/v2.0/me/contacts.

Mail API

Office 365 operated by 21Vianet Office 365
https://partner.outlook.cn https://graph.microsoft.com

https://outlook.office.com

For example, to get a user's emails using v2.0 of Office 365 operated by 21Vianet, submit a GET request to https://partner.outlook.cn/api/v2.0/me/messages.

Files API

Office 365 operated by 21Vianet Office 365
https://{tenant}-my.sharepoint.cn/_api/v1.0/me

https://{tenant}.sharepoint.cn/{site-path}/_api/v1.0
https://graph.microsoft.com

https://{tenant}-my.sharepoint.com/_api/v1.0/me (OneDrive for Business)

https://{tenant}.sharepoint.com/{site-path}/_api/v1.0 (SharePoint sites)

Calendar, Contacts, and Mail OData entity

Office 365 operated by 21Vianet Office 365
https://partner.outlook.cn/api/{version}/$metadata https://graph.microsoft.com/{version}/$metadata

https://outlook.office.com/api/{version}/$metadata

Specify the exact version in {version}. For example, the @odata.context for a calendar entity in v2.0 of Office 365 operated by 21Vianet is https://partner.outlook.cn/api/v2.0/$metadata#Me/Calendars/$entity.

Files OData entity

Office 365 operated by 21Vianet Office 365
https://{tenantId}-my.sharepoint.cn/_api/v1.0/$metadata https://graph.microsoft.com/v1.0/$metadata

https://{tenantId}-my.sharepoint.com/_api/v1.0/$metadata


The following sections are related to accounts and authentication.

Microsoft Azure

Office 365 operated by 21Vianet Office 365
https://account.windowsazure.cn https://account.windowsazure.com

Go to https://account.windowszaure.cn to set up the development environment for Office 365 operated by 21Vianet. For more information, see Set up your Office 365 development environment.

Azure OpenID Connect and OAuth

Office 365 operated by 21Vianet Office 365
https://login.chinacloudapi.cn https://login.microsoftonline.com

Use https://login.chinacloudapi.cn/common/oauth2/authorize to authenticate the user and https://login.chinacloudapi.cn/common/oauth2/token to to acquire a token for your app to call Office 365 operated by 21Vianet.

Office 365 developer site

In the following URLs, {your-sub-domain} is the name you specify when setting up your developer site.

Office 365 operated by 21Vianet Office 365
https://{your-sub-domain}.partner.onmschina.cn https://{your-sub-domain}.onmicrosoft.com