0

I am getting the below error from an API I have not changed since September, 2017. I have not run any pipelines for it in AzureDevOps since that time. It is hosted on prem in IIS and I keep the code in AzureDevOps. There is also an AzureAD that I use for authentication for the app that this API is consumed in, if that matters.

AADSTS7000222: InvalidClientSecretExpiredKeysProvided - The provided client secret keys are expired. Visit the Azure portal to create new keys for your app, or consider using certificate credentials for added security: https://aka.ms/certCreds

This is an aspnetcore app. From my project.json:

 "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

In the config.json file there is a clientSecret: value and clientId: - I am assuming I need to update the secret value...but I am not really sure what is actually corresponds to? I have looked through AzureAD in my organization where this client secret is configured but cannot find it anywhere. I am also looked in the associated pipeline but see no reference to it either.

What do I do?

default_noob_network
  • 1,204
  • 3
  • 19
  • 39

1 Answers1

0

Use the following steps to create a new client secret to your application.

  1. Log in to your organization's Azure Portal.
  2. Go to your organization's Azure Ad.
  3. In the left menubar you will be able to find a menu called "App Registration". Navigate to that menu.
  4. Check if you can find any registered application under that section and find the correct registered application that relevant to your hosted application.
  5. Click the correct registered application.

enter image description here

  1. In the overview section, you will be able to find the Client ID (Application ID).
  2. Then click the Certificate & secrets section.
  3. Under Client secrets, click New client secret to create a new secret.
  4. Provide a description for the secret, and choose the desired expiration interval.
  5. Immediately copy the value of the new secret and replace your client secret with the newly created client secreat value.
  • I have done this. I updated my app with the new Secret, but it still gives the same error. Is there a period of time it takes until this begins accepting the new secret? – default_noob_network Jun 02 '21 at 12:06
  • this is absolutely not working. I have created a new client secret and have updated it in my app. I now get: AADSTS7000215: Invalid client secret is provided. – default_noob_network Jun 02 '21 at 13:42
  • Sorry for misleading you. I have provided steps to create a new client secret for your app. Now I can understand that does not solve your problem from my answer. Check this question. It bit similar to your problem. https://stackoverflow.com/questions/63954400/aadsts7000222-the-provided-client-secret-keys-are-expired – Mihira Bandara Jun 02 '21 at 16:32