This issue has been fixed by Microsoft. We haven't got this error since 2024/9/13.
Encounter "Access to tenant is denied/Teams has been disabled on the tenant" error with list chat members API
CAT
41
Reputation points
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:
- tenant_id: dcb0e1d1-6cde-4420-a658-ede52a8bead1
- chat_id: 19:301e3eaa-08eb-42f9-8c87-c7bf7427e4f8_3aa4fc7d-c1b0-4f85-a72c-ca5c9057ef3d@unq.gbl.spaces
- API usage: https://graph.microsoft.com/v1.0/chats/19:301e3eaa-08eb-42f9-8c87-c7bf7427e4f8_3aa4fc7d-c1b0-4f85-a72c-ca5c9057ef3d@unq.gbl.spaces/members
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.