Access Microsoft Graph API with Qt (using Qt Network Authentication) 

1. register a native application at the Microsoft Azure Active directory:
https://portal.azure.com






Make sure you start the redirect url with http://127.0.0.1 not http://localhost! More details here.

3. starting from the reddit example modify your dode with:

auto replyHandler = new QOAuthHttpServerReplyHandler(1337, this);
oauth2.setClientIdentifier("xxxxxx-a90c-494d-808e-3749796ae80f";);
oauth2.setReplyHandler(replyHandler);
oauth2.setAuthorizationUrl(QUrl("https://login.microsoftonline.com/common/oauth2/authorize";));
oauth2.setAccessTokenUrl(QUrl("https://login.microsoftonline.com/common/oauth2/token";));

[ hozzászólás ] [ 0 trackbackek ] permalink ( 2.8 / 23 )

<< <Előző | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Következő> >>

 
számláló