2
votes

Azure Mobile Apps can authenticate against identity providers such as Facebook, Google, Twitter, and Microsoft. After logging in, the mobile client is returned a MobileServiceUser object. That object contains no profile information from the identity provider such as a Twitter screen name, Facebook name, etc.

How can I get that information? I'm specifically interested in a Twitter screen name, aka handle.

I'm aware of a blog post called Getting user information on Azure Mobile Services. However, it covers the JavaScript backend, not the .NET backend which I use. Also, a simple solution only involving the mobile client and not the backend would be preferable.

If anyone from the Azure team reads this, I'd love to see MobileServiceUser include profile info just like Auth0 does.

1

1 Answers

3
votes

You can do a HTTP GET of the /.auth/me endpoint submitting the MobileServiceUser.mobileServicesAuthenticationToken as a header named X-ZUMO-AUTH.

This will return a JSON blob that you can decode for the user information.

And I do work for Azure - understand the request. Please post on the Azure Mobile Apps UserVoice: https://feedback.azure.com/forums/216254-mobile-apps