AdalServiceException: AADSTS7000215: Invalid client secret is provided

amsDeveloper 71 Reputation points
2019-12-11T00:09:19.353+00:00

My Web App, which was working fine till yesterday, has suddenly started throwing the exception below since yesterday.

AggregateException: One or more errors occurred.
System.Threading.Tasks.Task.ThrowIfExceptional(bool includeTaskCanceledExceptions)

AdalServiceException: AADSTS7000215: Invalid client secret is provided.
Trace ID: de067aef-cfed-4468-9488-633704897701
Correlation ID: e0449ed4-02ab-4cf2-8859-e5f049e5f8e7
Timestamp: 2019-12-11 00:02:30Z
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalHttpClient.GetResponseAsync(bool respondToDeviceAuthChallenge)

From brief investigation, I found that some service/application has expired. But, not able to figure out which one. Because, in "App Registrations" in Active Directory, all registrations which were expired have now been updated with new client secrets.

Also, this has started happening after Base64 encoding was done for setting Blob Metadata with;

Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(metaattribute.Trim()))

The indexer has been given FieldMapping decoder as below;

FieldMapping("MetaAttribute", "MetaAttribute", FieldMappingFunction.UrlDecode())

How do I troubleshoot this? I don't see "App Service" registration in "App Registration". Is that the cause?

alt text

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
757 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. amsDeveloper 71 Reputation points
    2019-12-11T06:58:21.367+00:00

    I had to create a new Client Secret Key (in Active Directory->App Registrations) for my Media Services application and replace the old key with new one in the code. Not sure why Azure doesn't give any specific warnings before token expiration date..


  2. Jay Mistry 0 Reputation points
    2023-05-31T13:42:02.43+00:00

    Your just need to add "Value" of Client secret.

    0 comments No comments