Skip to content

MSGraph example not working for Native apps #146

@lucaotta

Description

@lucaotta

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions