Microsoft Graph API chats Endpoint fails with UnkownError

Céline Flores Willers 0 Reputation points
2025-04-08T06:42:58.3733333+00:00

I'm building an Entra ID App with delegated permissions and currently encountering problems with the chat and channels endpoints (https://graph.microsoft.com/v1.0/chats and https://graph.microsoft.com/v1.0/joinedTeams).

The issue is that im receiving a 401 Error with the response:

{
	"error": {
		"code": "Unauthorized",
		"message": "UnknownError",
		"innerError": {
			"code": "Unauthorized",
			"date": "2025-04-07T15:58:10",
			"request-id": "3b025224-725d-4263-b880-e6dfb04490b7",
			"client-request-id": "3b025224-725d-4263-b880-e6dfb04490b7"
		}
	}
}

I used the same token for https://graph.microsoft.com/v1.0/me and it works fine also the jwt token shows me I should be authorized to request chats: "scp": "Channel.ReadBasic.All ChannelMessage.Send Chat.Create Chat.Read Chat.ReadBasic Chat.ReadWrite email openid profile Team.ReadBasic.All User.ReadBasic.All".

I'm very grateful for any help to come over this issue quickly.

When you have deeper knowledge in this, it would be amazing if you could share resources or infos to better understand how to let other organizations use my Entra ID app. I allowed it in multiple settings but encountered the problem that when I request the /users endpoint, I can only see accounts that connected to my app but not from their entire organization.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,483 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rajat Vashistha-MSFT 1,535 Reputation points Microsoft External Staff
    2025-04-08T09:13:02.9333333+00:00

    Hi Céline Flores Willers,

    Thanks for reaching out to Microsoft!

    Currently, you are using delegated permissions, which allow you to run the API with the /me endpoints. This works for a signed-in user with admin permissions. However, to meet your requirement of running the API with the /users endpoint to check it for the entire organization, please register an application in Entra with application permissions. Use Postman with the Microsoft Graph API and observe the behavior.

    List joinedTeams

    User's image Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment


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.