UnknownTenantID when requesting reports from Graph

Laura Gute 1 Reputation point
2020-12-30T16:28:05.53+00:00

I have been pulling a few of the MS 365 Graph reports and my users and groups list, with a registered app. Using my developer account, this was working, as recently as last Thursday, 12/24/2020.

This week, I can still pull users and groups lists, but not the reports. I get the following error, when requesting reports...

HTTP error 404
UnknownError - code: "UnknownTenantId", message: "We do not recognize this tenant ID b45d6a6c-1289-4897-8987-b155bbbd594a. Please double-check the tenant ID and try again."

The app has granted API permissions to

API / Permissions name Type Description
Microsoft Graph (3)
Group.Read.All Application Read all groups
Reports.Read.All Application Read all usage reports
User.Read.All Application Read all users' full profiles

Did permissions change or something else change?

I created a second developer account, just in case it was my account. I get the same error from my new account, when requesting reports.

Thanks!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,586 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Laura Gute 1 Reputation point
    2020-12-31T18:56:19.49+00:00

    @Alfredo Revilla - Senior Freelance SWE, SWA, IAM

    Here's a fresh response...

     HTTP/1.1 404 Not Found  
     Cache-Control: private  
     Content-Type: application/json  
     request-id: 4d0157be-ae5a-4aaf-9fc1-0af27cc8ae07  
     client-request-id: 4d0157be-ae5a-4aaf-9fc1-0af27cc8ae07  
     x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"North Central US","Slice":"SliceC","Ring":"2","ScaleUnit":"000","RoleInstance":"AGSFE_IN_9"}}  
     Strict-Transport-Security: max-age=31536000  
     Date: Thu, 31 Dec 2020 18:48:18 GMT  
     Content-Length: 446  
          
     {  
       "error": {  
         "code": "UnknownError",  
         "message": "{\\"error\\":{\\"code\\":\\"UnknownTenantId\\",\\"message\\":\\"We do not recognize this tenant ID b45d6a6c-1289-4897-8987-b155bbbd594a. Please double-check the tenant ID and try again.\\"}}",  
         "innerError": {  
           "date": "2020-12-31T18:48:18",  
           "request-id": "4d0157be-ae5a-4aaf-9fc1-0af27cc8ae07",  
           "client-request-id": "4d0157be-ae5a-4aaf-9fc1-0af27cc8ae07"  
         }  
       }  
     }  
    

    Thanks!


  2. Laura Gute 1 Reputation point
    2020-12-31T21:42:39.917+00:00

    @Alfredo Revilla - Senior Freelance SWE, SWA, IAM

    All my requests use the same Application/Client ID, Directory/Tenant ID and Client Secret. The only difference is the first one requests a report...
    https://graph.microsoft.com/v1.0/reports/getOffice365ActivationCounts

    ...and the second requests a non-report...
    https://graph.microsoft.com/v1.0/groups?$select=id,displayName&$orderby=displayName (full response, below)

    HTTP/1.1 200 OK  
    Cache-Control: private  
    Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8  
    request-id: b25907bf-4f55-4a27-ba19-5fa7563c5c4e  
    client-request-id: b25907bf-4f55-4a27-ba19-5fa7563c5c4e  
    x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"North Central US","Slice":"SliceC","Ring":"2","ScaleUnit":"000","RoleInstance":"AGSFE_IN_20"}}  
    x-ms-resource-unit: 1  
    OData-Version: 4.0  
    Strict-Transport-Security: max-age=31536000  
    Date: Thu, 31 Dec 2020 21:28:18 GMT  
    Content-Length: 399  
      
    {"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#groups(id,displayName)","value":[{"id":"a6cf455d-f9fd-4456-b7ff-3ffdef9f7c85","displayName":"All Company"},{"id":"0c1eb50f-8dde-43b5-a893-cf6bbcc395de","displayName":"Contoso Team"},{"id":"19b9285d-c9ef-4df7-a09c-85d2b6c32cd9","displayName":"nagiosdev"},{"id":"98e20d77-7091-4dfd-b281-fe0dabf1a212","displayName":"Team Site with Data"}]}  
    

    Thanks!

    0 comments No comments

  3. Invarosoft-colombo 1 Reputation point
    2021-06-17T05:09:48.317+00:00

    I too having this problem, can get users and groups and licenses, but can't get for mail related reports(i.e mailusagedetail) is always return above error as same as "We do not recognize this tenant ID 9d99877c-03b5-4f6a-90d8-0609c9eb5d06. Please double-check the tenant ID and try again" is because of test account?

    0 comments No comments

  4. Productiv Demo 0 Reputation points
    2023-01-31T18:11:51.6433333+00:00

    @Alfredo Revilla - Senior Freelance SWE, SWA, IAM Was this resolved / Did anyone find an answer to this ? I am running into the same issue

    0 comments No comments

  5. Jammaica DV 0 Reputation points
    2023-08-09T00:21:13.2666667+00:00

    hi @Alfredo Revilla - Senior Freelance SWE, SWA, IAM was this resolved? I'm also experiencing the issue atm.