2
votes

I am getting the below exception

"error": { "code": "OrganizationFromTenantGuidNotFound", "message": "The tenant for tenant guid '****' does not exist.", "innerError": { "request-id": "2acd6af1-99f8-4aab-b71d-cffc60263a05", "date": "2019-04-20T11:33:04" }

while updating the group using open extension as shown below: -

POST https://graph.microsoft.com/v1.0/groups/db5f4dbe-40e0-4352-84fb-9a20c131cfaf/extensions HTTP/1.1 Authorization: Bearer **** Content-Type: text/plain; charset=utf-8 Host: graph.microsoft.com Content-Length: 111 Expect: 100-continue Connection: Keep-Alive

{ "@odata.type":"microsoft.graph.openTypeExtension","extensionName":"com.test.nickName","date":"OpenExtension"}

I am using user***@outlook.com id and having active azure subscription. I have given all delegated permission to microsoft graph.

1
Looks like you're using a Microsoft Account ***@outlook.com and the error is happening when trying to figure out the tenant.. Can you try using any organizational account instead (after giving them the relevant permissions)? like ***@yourADTenant.onmicrosoft.com or ***@yourtenantverfieddomain.comRohit Saigal
Still same error. I tried using [email protected]mohit garg

1 Answers

1
votes

Content type was not specified and it was going as text. Error handling could be improved. After changing content type to "application/json", it is working perfectly fine.

POST https://graph.microsoft.com/v1.0/groups/db5f4dbe-40e0-4352-84fb-9a20c131cfaf/extensions HTTP/1.1 Authorization: Bearer **** Content-Type: application/json; charset=utf-8 Host: graph.microsoft.com Content-Length: 111 Expect: 100-continue Connection: Keep-Alive

{ "@odata.type":"microsoft.graph.openTypeExtension","extensionName":"com.test.nickName","date":"OpenExtension"}