1
我試圖調用Microsoft Graph API來創建域。不幸的是,當我去打電話時,我收到一個錯誤,指出「JSON有效負載爲空」。「清空有效負載。 JSON內容預計「調用Microsoft Graph創建域的錯誤
這裏是我打出電話:
GraphServiceClient _graphServiceClient =
new GraphServiceClient(new GraphAuthenticationHelper(NetOrgDomain));
HttpRequestMessage httpRequestMessage =
new HttpRequestMessage(httpMethod, requestUri);
string content = "{\"id\": \"sampleDomainAdd.info\"}";
var json = JsonConvert.SerializeObject(content);
var jsonContent = new StringContent(json, Encoding.UTF8, "application/json");
httpRequestMessage.Content = jsonContent;
HttpResponseMessage response =
await _graphServiceClient.HttpProvider.SendAsync(httpRequestMessage);
我無法在我的graphserviceclient中看到Domains屬性,我是否需要爲此更改任何權限? – Yari
SDK不知道權限。確保您使用的是最新版本的SDK(請參閱答案中的鏈接)。 –
我沒有使用最新版本的圖表,但我如何跟上版本中發佈的版本和屬性? – Yari