MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
281 stars 502 forks source link

List chats API return with error when I request the second pages #11571

Open qquiuc opened 6 days ago

qquiuc commented 6 days ago

Steps to reproduce

Hi Team, I'm working on a migration project, and we have use the https://learn.microsoft.com/en-us/graph/api/resources/chat?view=graph-rest-1.0 to list all the chats of a user, but the issue happens when we use the “@odata.nextLink” to get the chats in next page, and the issue happens when we have the "$expand=members" in the request url. Request url: https://graph.microsoft.com/v1.0/chats?$expand=members&$skiptoken=1.kscDYs0BEcYAAAEU8P8DgapQcm9wZXJ0aWVzgqlTeW5jU3RhdGXZ6GV5SmtaV3hwZG1WeVpXUlRaV2R0Wlc1MGN5STZXM3NpYzNSaGNuUWlPaUl5TURJMExUQTNMVEU0VkRBMU9qVXdPalF3TGpNeU55c3dNRG93TUNJc0ltVnVaQ0k2SWpJd01qUXRNRGt0TVRCVU1EZzZOVGs2TlRndU5ERTJLekF3T2pBd0luMWRMQ0o2WlhKdlRFMVRWRVJsYkdsMlpYSmxaRk5sWjIxbGJuUnpJanBiWFN3aWMyOXlkRTl5WkdWeUlqb3dMQ0pwYm1Oc2RXUmxXbVZ5YjB4TlUxUWlPbVpoYkhObGZRPT2sTGFzdFBhZ2VTaXplojIw 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-11T01:52:50", "request-id": "5e385d12-51ca-4a99-a7b2-51110fd11ecb", "client-request-id": "0f194d97-9fdf-72a6-76de-35fd1fcde501" } } } WXWorkCapture_17260196032496

Expected behavior

Return the next page with chats

Actual behavior

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-11T01:52:50", "request-id": "5e385d12-51ca-4a99-a7b2-51110fd11ecb", "client-request-id": "0f194d97-9fdf-72a6-76de-35fd1fcde501" } } }

Error details

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-11T01:52:50", "request-id": "5e385d12-51ca-4a99-a7b2-51110fd11ecb", "client-request-id": "0f194d97-9fdf-72a6-76de-35fd1fcde501" } } }

microsoft-github-policy-service[bot] commented 6 days ago

Hi qquiuc! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Prasad-MSFT commented 6 days ago

@qquiuc, thanks for raising your issue. We are checking this and will get back to you shortly.

Prasad-MSFT commented 6 days ago

@qquiuc, we tried to repro this issue using below API query

image

and when we use the “@odata.nextLink” to get the chats in next page, it worked properly without any failure.

image

Ensure that your tenant has an active Office 365 subscription & Teams has not been explicitly disabled by the tenant administrator.

microsoft-github-policy-service[bot] commented 1 day ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.