Got 404 NotFound trying to install app for a user

Scott Jiang 21 Reputation points
2023-11-01T01:51:56.6066667+00:00

Hi, I have a multi-tenant azure app and when our application tries installing a Teams app to the users of a tenant with

POST https://graph.microsoft.com/v1.0/users/<user id>/teamwork/installedApps

API, we got 404 Not Found error with the following response:

{"error":{"code":"NotFound","message":"User Id '<redacted>' not found.","innerError":{"date":"2023-10-31T12:56:09","request-id":"660c2879-fe7d-45b1-8ca9-ce5401b83840","client-request-id":"660c2879-fe7d-45b1-8ca9-ce5401b83840"}}}

These users do exist if I call https://graph.microsoft.com/v1.0/users/<user id> BTW.

The access token is confirmed to have the TeamsAppInstallation.ReadWriteForUser permission. Could you help find out what could possibly go wrong? Thanks!

Microsoft Security | Microsoft Graph
{count} votes

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.