Microsoft Graph API – Is it possible send chat message using client credentials flow?
I was using grant type as password to generate bearer token for sending Teams notification with my application (I had done application registration in Microsoft Azure AD). It was working fine, but then it failed and threw the below error.
{
"error": "invalid_grant",
"error_description": "AADSTS50055: The password is expired. Trace ID: 411e883a-ac32-4387-9e08-e4a6cccf8300 Correlation ID: bde4686c-1e78-41d3-bb60-a75190ca8891 Timestamp: 2024-12-03 14:12:36Z",
"error_codes": [
50055
],
"timestamp": "2024-12-03 14:12:36Z",
"trace_id": "411e883a-ac32-4387-9e08-e4a6cccf8300",
"correlation_id": "bde4686c-1e78-41d3-bb60-a75190ca8891",
"error_uri": "https://login.microsoftonline.com/error?code=50055",
"suberror": "user_password_expired"
}
When I logged in to teams, it was prompting to update password to login. After changing password, it is working fine now.
But this approach is not feasible since we need to update in regular intervals in production configuration.
Any idea regarding this to keep the password permanent would be very helpful !
1