Azure-Samples / ms-identity-python-webapp

A Python web application calling Microsoft graph that is secured using the Microsoft identity platform
MIT License
293 stars 138 forks source link

AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' #113

Closed peya02 closed 1 year ago

peya02 commented 1 year ago

Python: Has anyone gotten this error?

invalid_client AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented. Trace ID: 0f0600 Correlation ID: 0a2cf92d Timestamp: 2023-08-01 11:38:36Z

I don't know if I'm putting the data where it should be AUTHORITY = "https://login.microsoftonline.com/"

is it so?

rayluo commented 1 year ago

If you haven't already, please follow the first link in our README. It will guide you through the setup. Please let us know if any part of that docs is unclear.

peya02 commented 1 year ago

Hello,

following the page [https://learn.microsoft.com/es-es/azure/active-directory/develop/web-app-quickstart?pivots=devlang-python&tabs=windows] in Section 5 "Under Supported account types, select Accounts in any organizational directory and personal Microsoft accounts."

I have a single tenant position and not (multiple tenant) which is what it indicates. Do you mean that with a single tenant it doesn't work?

peya02 commented 1 year ago

In the end it worked for me with a single tenant, I had to put the web in the authentication part since being locally it redirects to http and not to https that SPA uses

rayluo commented 1 year ago

In the end it worked for me with a single tenant, I had to put the web in the authentication part since being locally it redirects to http and not to https that SPA uses

Indeed the redirect URI has to choose the Web platform, as described in step 1.6 of the doc that we quoted. Glad that it works out well for you.