通过ID获取网站时出现Microsoft Graph API serviceNotAvailable错误 [英] Microsoft Graph API serviceNotAvailable error when getting site by ID
问题描述
尝试获取由Post使用Graph API成功创建的Sharepoint网站时,出现HTTP 503状态MSFT Graph API错误.
I am getting an HTTP 503 status MSFT Graph API error when attempting to get a Sharepoint site that was successfully created by a Post with the Graph API.
我正在使用Developer O365订阅.
I am using a Developer O365 subscription.
正在使用一个使用MSFT MSAL库来管理身份验证令牌的Python应用程序.我能够使用python应用程序成功调用Graph API的其他部分.当使用Graph Explorer登录到我的帐户并具有站点权限时,我得到正确的成功响应.大约10-40个请求后,该python应用程序工作了一个小时或两个小时,但现在由于serviceNotAvailable错误而被冻结.
A Python application using the MSFT MSAL library for managing the authentication token is being used. I am able to successfully call other parts of the Graph API with the python app. When using the Graph Explorer logged into my account and with Site permissions I get a correct successful response. The python application worked for an hour or two after about 10-40 requests, but now is frozen in error with serviceNotAvailable.
python客户端的AD应用程序权限为:
The AD Application Permissions for the python client are:
- Directory.ReadWrite.All
- Group.Create
- Group.ReadWrite.All
- Sites.FullControl.All
- Sites.Manage.All
- Sites.Read.All
- Sites.ReadWrite.All
- User.Read
我正在调用GET的端点是: https://graph.microsoft.com/v1.0/sites/mydomain,some-uuid
The endpoint I am calling GET with is: https://graph.microsoft.com/v1.0/sites/mydomain,some-uuid
我得到的响应头是:
{
'Cache-Control': 'private',
'Content-Type': 'application/json',
'request-id': 'ff8256de-f833-4916-85c2-2ee229a68135',
'client-request-id': 'ff8256de-f833-4916-85c2-2ee229a68135',
'x-ms-ags-diagnostic': '{
"ServerInfo":{
"DataCenter":"North Central US",
"Slice":"SliceC",
"Ring":"3",
"ScaleUnit":"002",
"RoleInstance":"AGSFE_IN_3"}}',
'Strict-Transport-Security': 'max-age=31536000',
'Date': 'Wed, 04 Mar 2020 17:47:03 GMT',
'Content-Length': '306'
}
响应正文为:
{
"error": {
"code": "serviceNotAvailable",
"message": "The service is not available. Try the request again after a delay. There may be a Retry-After header.",
"innerError": {
"request-id": "ff8256de-f833-4916-85c2-2ee229a68135",
"date": "2020-03-04T17:47:03"
}
}
}
我在MSFT文档中读到,这是违反使用条款的限制错误,并且Graph Explorer不受限制的限制.我再也没有"Retry-After"标头.
I read in the MSFT docs that this is a throttling error for violating terms of use and that Graph Explorer is not subjected to throttling restrictions. I never get the "Retry-After" header.
有人知道如何使我的API调用成功吗?如何通过MSFT重设节流?我可能会在一小时内进行100-150个Graph API调用.
Does anyone know how to get my API call to be successful? How to reset the throttling by MSFT? I might make 100 - 150 Graph API calls in an hour.
推荐答案
我们在多个Office365租户中遇到了此问题.我们与Microsoft取得了联系,他们说他们正在修复这是服务器方面的错误.他们现在正在为我们的一位客户部署修补程序. 这不会节流,因为在第一次API调用中会发生错误.不幸的是,除了打开Microsoft的票证之外,您无法采取任何其他措施. 顺便说一句,这个电话已经运行了一年多.该错误始于2020年2月底.
We have been having this issue with multiple Office365 tenants. We reached out to Microsoft and they said it is a server-side bug from their side that they are fixing. They are deploying a fix for one of our customers now. This is not throttling as the error occurs from the first API call. Unfortunately, you can't do anything about it except opening a ticket to Microsoft. By the way, this call had been working fine for over a year. The error started occurring by the end of February 2020.
这篇关于通过ID获取网站时出现Microsoft Graph API serviceNotAvailable错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!