question

testwps-0762 avatar image
0 Votes"
testwps-0762 asked JamesTran-MSFT commented

Delta does't work in AzureChina

in my application, i try to login account with Azure China 21Vianet.
First, i login success with MSAL,
then i try to load data from server with
```
https://microsoftgraph.chinacloudapi.cn/v1.0/me/mailFolders/microsoft.graph.delta
```
later,i get 400:Bad Request error, and the message
```
{
"error": {
"code": "ErrorInvalidIdMalformed",
"message": "Id is malformed.",
"innerError": {
"date": "2020-10-28T11:18:25",
"request-id": "9a6b40af-c64d-4409-b680-6beb6a85d41d",
"client-request-id": "a9e73033-5341-46f0-a9ce-4fbdc1a8fd3e"
}
}
}
```
Doesn't the AzureChina server support the mailFolders Delta?
Or has another way to make it work?

azure-active-directoryazure-ad-graphazure-ad-app-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JamesTran-MSFT avatar image
0 Votes"
JamesTran-MSFT answered JamesTran-MSFT commented

@testwps-0762
Thank you for your question!

Looking through the Get mailFolder API documentation and testing this out myself, I found that if I ran the same url you did, I got a 401 error rather than 400:

https://microsoftgraph.chinacloudapi.cn/v1.0/me/mailFolders/microsoft.graph.delta
36165-image.png

However, when I changed the URL from "microsoftgraph.chinacloudapi.cn" to "graph.microsoft.com" I was able to make a successful call.

https://graph.microsoft.com/v1.0/me/mailFolders/microsoft.graph.delta
36087-image.png


I hope this helps! If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.


image.png (37.3 KiB)
image.png (19.6 KiB)
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your answer!
I had tried this feature with https://graph.microsoft.com/v1.0/me/mailFolders/microsoft.graph.delta, and it worked always.
But it didn't work with "https://microsoftgraph.chinacloudapi.cn/v1.0/me/mailFolders/microsoft.graph.delta"
The "microsoftgraph.chinacloudapi.cn" and "graph.microsoft.com" are from different National clouds: Azure AD China operated by 21Vianet and Azure AD (global service).
National clouds are physically isolated instances of Azure .National clouds are unique and a separate environment from Azure global.
So to solve the problem with 401 error, you should have a Azure AD China operated by 21Vianet account and sign in .
To test graph api in" Azure AD China operated by 21Vianet " , we need to visit the website "https://developer.microsoft.com/zh-cn/graph/graph-explorer-china".






0 Votes 0 ·

@testwps-0762
I just wanted to follow up and let you know that I received an update from our engineering team and the issue should be resolved on our end, if you can please retry the operation.


If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.


Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

1 Vote 1 ·

@testwps-0762
Thank you for the clarification!

https://docs.microsoft.com/en-us/graph/delta-query-overview#national-clouds
36404-image.png


I've reached out to our product team regarding this issue and will update as soon as possible.


If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.

0 Votes 0 ·
image.png (9.4 KiB)

@testwps-0762
Thank you for your time and patience throughout this issue. I wanted to reach out and let you know that we're still waiting on a response from our engineering team.

If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.

0 Votes 0 ·
Show more comments