-1

Client Secret created by this command $appSecret = New-AzureADApplicationPasswordCredential -CustomKeyIdentifier PrimarySecret -ObjectId $app.ObjectId

gives error, when I am using that secret key

Authentication failed: AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'xxxx'

I have provided client secret for sure

halfer
  • 19,824
  • 17
  • 99
  • 186
gnsharans
  • 21
  • 3

1 Answers1

0

Authentication failed: AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'xxxx'

The error clearly stating that the provided client secret is invalid. Make Sure you have the client secret value but not the secret identifier as the value to the cmdlets.

enter image description here

Above PowerShell Cmdlet has created the secret for my function app: enter image description here

Above marked value is the Client secret value which should be passed to the application in order to get rid from the error Invalid Client Secret Provided or create the new secret and pass the secret value to the application.