Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AADSTS50012: Invalid client secret is provided when moving from a Test App to Production

I have two applications registered under the Azure Portal: a test version and a production version. My test App works fine with the Client Id and ClientSecret/AppKey that I got from the test app's detail from Azure Portal. However when I move to the production one as I replace the ClientId and Secret values with the one specified by the production App I registered, I suddenly get an error:

AdalServiceException: AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided

But I'm fairly sure that my client secret is correct as I just copied and pasted from the Portal. Is there any solutions to this?

like image 330
yfan183 Avatar asked Feb 27 '17 03:02

yfan183


People also ask

What is Clientsecretcredential?

Enables authentication to Azure Active Directory using a client secret that was generated for an App Registration.


1 Answers

Encode your secret ( e.g. replace + by %2B , = by %3D etc)

like image 150
fdulau Avatar answered Oct 11 '22 06:10

fdulau