Microsoft Graph API 504 Gateway Timeout on Bot App Installation for user

Gopi Krishnan 1 Reputation point
2022-04-04T10:38:04.577+00:00

I am using MS Graph API to install a custom Teams bot App for all users in an organization that is using Teams.

The app got installed successfully for 95% of total users without any error. But only for a few users, the app installation API responds with 504 gateway timeout.

Here is the sample curl of the API request.

curl --location --request POST 'https://graph.microsoft.com/v1.0/users/xxxx-xxxx-xxxx/teamwork/installedApps' \
--header 'Authorization: Bearer XXXXXXXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
   "teamsApp@odata.bind" : "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/XXXXX-XXXX-XXXX-XXX-XXXXXXX"
}'

Here is the error response.

{
    "error": {
        "code": "UnknownError",
        "message": "",
        "innerError": {
            "date": "2022-04-04T10:07:10",
            "request-id": "fc8c147d-9999-4bf6-aba4-5f765c7cad1e",
            "client-request-id": "fc8c147d-9999-4bf6-aba4-5f765c7cad1e"
        }
    }
}

Please help here!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,646 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Maneesh Rao 6 Reputation points
    2022-08-07T09:44:46.727+00:00

    @CarlZhao-MSFT I am also facing the same error when calling this API. It was working fine till now and suddenly throwing "Unknown Error". It has affected our customer. Any help would be appreciated

    curl --location --request GET 'https://graph.microsoft.com/v1.0/users/{{userid}}/teamwork/installedApps?$expand=teamsAppDefinition' \  
    --header 'Authorization: Bearer <token>  
    
    1 person found this answer helpful.
    0 comments No comments