Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSGraph example not working for Native apps #146

Open
lucaotta opened this issue Sep 23, 2021 · 0 comments
Open

MSGraph example not working for Native apps #146

lucaotta opened this issue Sep 23, 2021 · 0 comments

Comments

@lucaotta
Copy link

I've created a desktop app in Azure AD and I've added a redirect URL for 127.0.0.1.
I've put the client id and the client secret in the msgraph example, but at the end of the authentication I get an error:

O2::onTokenReplyError:  QNetworkReply::AuthenticationRequiredError :  "Host requires authentication"
O2::onTokenReplyError:  "{\"error\":\"invalid_client\",\"error_description\":\"AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented

The example uses O2::GrantFlowAuthorizationCode authentication method. The workaround I've found is to comment the line

parameters.insert(O2_OAUTH2_CLIENT_SECRET, clientSecret_);

from O2::onVerificationReceived.

Is there a better way? Do you think this is due to MS Graph OAuth dialect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant