Call to invitations at https://graph.microsoft.com/v1.0/invitations getting an unknown error

Vasquez Saenz, Javier (WDC) 10 Reputation points
2024-07-03T12:25:34.9+00:00

When invoking https://graph.microsoft.com/v1.0/invitations from our code the actual invitation get sent but the call returns a 504 timeout or an unknown error

We are calling it with this code //Invite AD Users sendInvite(inviteObj: any, token: any): Observable<any> { const httpgraphOptions = { headers: new HttpHeaders( { ‘Authorization’: Bearer ${token} } ) }; return this.httpClient.post<any>(https://graph.microsoft.com/v1.0/invitations, inviteObj, httpgraphOptions

) }

//Invite AD Users sendInvite(inviteObj: any, token: any): Observable<any> { const httpgraphOptions = { headers: new HttpHeaders( { ‘Authorization’: Bearer ${token} } ) }; return this.httpClient.post<any>(https://graph.microsoft.com/v1.0/invitations, inviteObj, httpgraphOptions

) }

And we get this error

{ “error”: { “code”: “UnknownError”, “message”: “”, “innerError”: { “date”: “2024-07-02T15:28:10”, “request-id”: “1d8ced3e-77dd-4357-ba45-2446f0593587”, “client-request-id”: “1d8ced3e-77dd-4357-ba45-2446f0593587” } } }

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