Login failed for Azure AD with error client authentication failed

how to resolve client authentication error for Azure AD users?

Issue Description

Note: All the local accounts work fine including admin but the directory users do not.

Error in the Identity pod:

"OpenIdConnectProtocolException*Refresh operation error status code: Unauthorized, reason phrase: Unauthorized and content = {\"error\":\"invalid_client\",\"error_description\":\"AADSTS70000222: The provided client secret keys for app '0xxxxxxxxxxxxxxxx2' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: xxxxxxxxxxxxxxxxx00 Correlation ID: f0xxxxxxxxxxxx312c1cdbf4 Timestamp: 2024-09-12 21:35:29Z\",\"error_codes\":[7000222],\"timestamp\":\"2024-09-12 21:35:29Z\",\"trace_id\":\"ab4cfdxxxxxxxxxxxxxx\",\"correlation_id\":\"fxxxxxxxxxxxxxxxx6431xxcdbf4\",\"error_uri\":\"https://login.microsoftonline.com/error?code=7000222\"}* at UiPath.IdentityServer.Application.Directory.UserTokenService.RefreshUserTokenAsync(Guid userId) in /home/vsts/work/1/s/src/Application/Directory/UserTokenService.cs:line 264"}

2024-09-12T21:35:29+00:00

Browser error:

Client Authentication failed.

Root Cause

This error generally occurs if the app secret is expired for the Azure AD app it is registered to.

Resolution

  • Get a new secret from the Azure admin for the application being used to Azure AD setup. Please refer to this link or this one for the steps.
  • Similarly, update it in the Automation Suite for the affected organizations using steps in the Office docs.