OneDrive / onedrive-sdk-ios

OneDrive SDK for iOS
https://dev.onedrive.com
Other
100 stars 88 forks source link

How to get user details? #143

Closed vinceplusplus closed 7 years ago

vinceplusplus commented 8 years ago

There was a similar issue, #5, a year ago. Any update on API and SDK? Thanks

rgregg commented 8 years ago

@vinceplusplus:

This information is now available via Microsoft Graph. You can either continue to use OneDrive API and only call Microsoft Graph for user information, or migrate to Microsoft Graph for the full scenario, since the OneDrive API is also available as part of the Microsoft Graph.

-Ryan

deco1515 commented 7 years ago

@rgregg, I still failed to get displayname with the example project "IOSExplorer". Any suggestion?

MintSet commented 7 years ago

@deco1515, I spent a lot of time to solve this problem. I forked this repo and add to ODClient user email. https://github.com/MintSet/onedrive-sdk-ios

kevklam commented 7 years ago

@deco1515 Information on using the MSGraph API to retrieve user info is documented here: https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/users https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_get

You can experiment directly with the API here: https://graph.microsoft.io/en-us/graph-explorer

Once you know what API requests you need, you can use the MSGraph SDK to construct/execute the requests in your app: https://github.com/microsoftgraph/msgraph-sdk-ios

If you need further assistance, please open an issue in the MSGraph SDK repo for greater visibility and @ mention me.

Thanks, Kevin

bazik123 commented 7 years ago

@kevklam is there a way to authenticate in MSGraph SDK once I am authenticated in OneDrive SDK? MSGraph github page is telling me it's not production ready so I am not thrilled at the prospect of migrating to it completely..