Exumer
Exumer

Reputation: 56

How to get users email from MobileServiceClient?

i am using:

private MobileServiceClient mClient;

    private void authenticate() {

        mClient.login("windowsazureactivedirectory", "Scheme", LOGIN_REQUEST_CODE);
    }

I just can use getUserId()

Upvotes: 0

Views: 64

Answers (1)

Bruce Chen
Bruce Chen

Reputation: 18465

You can send an authenticated GET request to https://{your-appname}.azurewebsites.net/.auth/me endpoint for retrieving more detailed information about the logged user. You could leverage invokeApi for retrieving the json data as follows:

enter image description here

You need to parse the response and retrieve user's email under user_claims.

Upvotes: 1

Related Questions