Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error AADSTS50012: Client is public so a 'client_assertion' should not be presented

I am getting this error when trying to generate AAD token from clientid and certificate using below code.

Error: "AADSTS50012: Client is public so a 'client_assertion' should not be presented Native app"

Code: await context.AcquireTokenAsync(resource, assertionCert);

like image 238
Umair Akbar Avatar asked Feb 14 '17 06:02

Umair Akbar


People also ask

Is client_assertion and Client_Secret public or private?

AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented. Can someone assist? Post the command and your app registration config and somebody might be able to.

What does error aadsts70002 mean?

AADSTS50012: Invalid client secret is provided AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided I’ve been fighting with this error for the past week, and still haven’t found a solution for it.

What are the reasons for invalid client assertion?

Client assertion contains an invalid signature; AADSTS50013: InvalidAssertion - Assertion is invalid because of various reasons - The token issuer doesn't match the api version within its valid time range -expired -malformed - Refresh token in the assertion is not a primary refresh token. AADSTS50014

Which parameters are not supported in aadsts901002?

AADSTS901002: The 'resource' request parameter is not supported. InvalidEmailAddress - The supplied data isn't a valid email address. The email address must be in the format [email protected]. InvalidUriParameter - The value must be a valid absolute URI.


1 Answers

I found the the resolution for this.

I was registering my app as Native app in AAD. App should have been registered as WebApp

like image 56
Umair Akbar Avatar answered Nov 15 '22 09:11

Umair Akbar