Azure China developer guide
There are tools and documents to help developers create and deploy cloud applications to Microsoft Azure operated by 21Vianet (Azure China). Most of the currently available technical content, such as the global Azure documentation, assumes that applications are being developed for Azure global. Azure Docs for China (in Chinese) supplies technical content adapted for Azure China. For services available in Azure China, see Service availability and roadmaps of Azure China.
When referring to publicly available content for Azure global services, make sure to adapt the steps or customize any sample code that specifies settings for Azure global services. For example, customize the Azure service endpoints.
Develop for Azure users
If you’re accustomed to developing cloud services for users in other regions, make sure you consider the following user expectations in China:
- Mobile first: Mobile devices, not PCs, are considered the source of the online world. Make sure your design strategy is mobile-centric.
- QR codes and screen-scanning behavior: Websites, print ads, business cards, and other media commonly include QR codes. Include QR codes in your website header and footer, so visitors can quickly load the site’s mobile version on their phones.
- Content localization: Localizing is more than just translating content. Take time to understand the digital environment of your target market and the cultural ramifications of your business decisions. Then tailor your content accordingly.
Use social sites and media services in China
Commonly used western social media sites and services may be blocked in China. When operating a web presence in China:
- Avoid connecting to Google services on your website’s front end. Google, along with all of its services, is blocked in China. For best results, your site might need to avoid using Google services. For example, replace Google Maps with Baidu Maps, and use self-hosted fonts instead of Google fonts.
- Don't embed videos from YouTube or Vimeo. Both services are blocked in China. Host your video locally or on Chinese video hosting sites, such as Youku, Qiyi, Tudou, or use Azure Media Services. Optimize your site for Baidu, the most frequently used search engine in China, by using a search engine optimization (SEO) audit tool.
- Create a China-specific social network presence. Globally popular social networks, such as Facebook, Twitter, and Instagram, are blocked. Create a social marketing strategy specifically tailored for the social networks in China, such as WeChat and Sina Weibo. Azure doesn’t currently offer local social network integration (that is, a social identity provider).
Check endpoints in Azure
Azure China differs from Azure global, so any Azure service endpoints from Azure global sources, such sample code or published documentation, must be changed.
The following table shows the endpoints to change.
See also:
Service category | Azure global URI | Azure URI (in China) |
---|---|---|
Azure (in general) | *.windows.net | *.chinacloudapi.cn |
Azure compute | *.cloudapp.net | *.chinacloudapp.cn |
Azure storage | *.blob.core.windows.net *.queue.core.windows.net *.table.core.windows.net *.file.core.windows.net |
*.blob.core.chinacloudapi.cn *.queue.core.chinacloudapi.cn *.table.core.chinacloudapi.cn *.file.core.chinacloudapi.cn |
Azure service management | https://management.core.windows.net | https://management.core.chinacloudapi.cn |
Azure Resource Manager | https://management.azure.com | https://management.chinacloudapi.cn |
Azure SQL Database | *.database.windows.net | *.database.chinacloudapi.cn |
Azure portal | https://portal.azure.com | https://portal.azure.cn |
Azure Service | *.servicebus.windows.net | *.servicebus.chinacloudapi.cn |
HDInsight | *.azurehdinsight.net | *.azurehdinsight.cn |
API Management Gateway | *.azure-api.net | *.azure-api.cn |
API Management Portal | *.portal.azure-api.net | *.portal.azure-api.cn |
Azure Cloud Services | *.cloudapp.net | *.chinacloudapp.cn |
Event Grid | *.eventgrid.azure.net | *.eventgrid.azure.cn |
IoT Device Provisioning Service | *.azure-devices-provisioning.net | *.azure-devices-provisioning.cn |
IoT Hub | *.azure-devices.net | *.azure-devices.cn |
Time Series Insight | *.timeseries.azure.com | *.timeseries.azure.cn |
Automation - Registration URL | *-agentservice-prod-1.azure-automation.net | *-agentservice-prod-1.azure-automation.cn |
Media Service | *.restv2.westus.media.azure.net/api/ | *.restv2.chinanorth.media.chinacloudapi.cn/api/ |
Azure Database for MySQL | *.mysql.database.azure.com|*.mysql.database.chinacloudapi.cn | |
Azure Database for PostgreSQL | *.postgres.database.azure.com | *.postgres.database.chinacloudapi.cn |
Azure Database for MariaDB | *.mariadb.database.azure.com | *.mariadb.database.chinacloudapi.cn |
App Service | *.azurewebsites.net | *.chinacloudsites.cn |
App Service - Management | *.scm.azurewebsites.net | *.scm.chinacloudsites.cn |
Key Vault | *.vault.azure.net | *.vault.azure.cn |
Azure Data Explorer | *.dataexplorer.azure.com | *.dateexplorer.azure.cn |
Cognitive Services | https://westus.dev.cognitive.microsoft.com/docs/services/ | https://dev.cognitive.azure.cn/docs/services |
Azure Kubernetes Service | *.azmk8s.io | *.cx.prod.service.azk8s.cn |
Analysis Services | *.asazure.windows.net | *.asazure.chinacloudapi.cn |
Container Registry | quay.io docker.io gcr.io |
quay.azk8s.cn dockerhub.azk8s.cn gcr.azk8s.cn |
Cosmos DB | *.table.cosmos.azure.com *.cassandra.cosmos.azure.com *.gremlin.cosmos.azure.com |
*.table.cosmos.azure.cn *.cassandra.cosmos.azure.cn *.gremlin.cosmos.azure.cn |
Service Fabric | *.cloudapp.azure.com | *.cloudapp.chinacloudapi.cn |
Traffic Management | *.trafficmanager.net | *.trafficmanager.cn |
Power BI Embedded | https://api.powerbi.com | https://api.powerbi.cn |
Active Directory B2C | b2clogin.com | b2clogin.cn |
Azure AD Login | https://login.microsoftonline.com | https://login.partner.microsoftonline.cn |
Azure AD Graph API | https://graph.windows.net | https://graph.chinacloudapi.cn |
Microsoft Graph | https://graph.microsoft.com | https://microsoftgraph.chinacloudapi.cn |
CLI Login | az login |
1. 2. az login |
PowerShell Login | Connect-AzAccount |
Connect-AzAccount -Environment AzureChinaCloud |