Encounter "Access to tenant is denied/Teams has been disabled on the tenant" error with list chat members API

CAT 41 Reputation points
2024-09-10T07:34:08.2966667+00:00

Hi,

I've encountered some error when I use list chat members from 9/7 (https://learn.microsoft.com/en-us/graph/api/chat-list-members?view=graph-rest-1.0&tabs=http).

Some of the chats works fine, but some of them would return "Access to tenant is denied. Please contact admin for help" or "Teams has been disabled on the tenant. Ensure tenant has active Office 365 subscription.".

For example, with the following information:

I got this API response:

{

"error": {

    "code": "Unauthorized",

    "message": "Teams has been disabled on the tenant. Ensure tenant has active Office 365 subscription.",

    "innerError": {

        "code": "ServicePrincipalDisabledOnTenant",

        "date": "2024-09-10T06:49:19",

        "request-id": "9290d5e9-e847-4351-b860-8697fe2543d8",

        "client-request-id": "9290d5e9-e847-4351-b860-8697fe2543d8"

    }

}
```}

I've checked that this 1-on-1 chat belongs to my tenant (dcb0e1d1-6cde-4420-a658-ede52a8bead1), and the Teams subscription in my tenant work fine. I can use the same chat_id the get chat metadata or chat message. Here is the metadata from API (https://graph.microsoft.com/v1.0/chats/19:301e3eaa-08eb-42f9-8c87-c7bf7427e4f8_3aa4fc7d-c1b0-4f85-a72c-ca5c9057ef3d@unq.gbl.spaces).

{

```yaml
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats/$entity",

"id": "19:301e3eaa-08eb-42f9-8c87-c7bf7427e4f8_3aa4fc7d-c1b0-4f85-a72c-ca5c9057ef3d@unq.gbl.spaces",

"topic": null,

"createdDateTime": "2023-01-04T10:02:35.821Z",

"lastUpdatedDateTime": "2023-01-04T10:02:42.747Z",

"chatType": "oneOnOne",

"webUrl": "https://teams.microsoft.com/l/chat/19%3A301e3eaa-08eb-42f9-8c87-c7bf7427e4f8_3aa4fc7d-c1b0-4f85-a72c-ca5c9057ef3d%40unq.gbl.spaces/0?tenantId=dcb0e1d1-6cde-4420-a658-ede52a8bead1",

"tenantId": "dcb0e1d1-6cde-4420-a658-ede52a8bead1",

"viewpoint": null,

"onlineMeetingInfo": null
```}

I would appreciate any insights or guidance on resolving this issue.

Thanks.
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,153 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,057 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CAT 41 Reputation points
    2024-09-20T01:50:17.9566667+00:00

    This issue has been fixed by Microsoft. We haven't got this error since 2024/9/13.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.