简体   繁体   中英

MSGraphSDK user details API callback not responding back when user password changed in iOS

I tried to get the user details using MSGraph SDK in iOS using below API method. Iam successfully received the user details all the time. But when user charged their password or update their credentials, i received the oauthConnection Error: only in log. And i didn't receive any call back in the below API. Why it is not responding back when any kind of error occurred? Please help me. Thanks in advance.

[MSGraphClient setAuthenticationProvider:self.authProvider.authProvider];
self.graphClient = [MSGraphClient client];

[[[self.graphClient me]request]getWithCompletion:^(MSGraphUser *response, NSError *error) {
        if(!error){
            // Im able to get back here
        }
        else{

            //Im not received any call back here when user changed their password or any error occurred.
            [self.authProvider disconnect];


        }
    }];`

I am kinda new to MS Graph, so I might be missing something, but your graphClient declaration seems a little bit poor to me.

Try to download this sample: https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2

And check it's declaration of graphClient. You might be missing the part which refreshes the token?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM