javaservletsoauthoauth-2.0oauth-provider

How to get userinfo with Microsoft OAuth after successfully authenticated


My applications should login with Microsoft account (OAuth Provider). I got stuck to get user info after successfully authenticated by using following URL https://login.live.com/oauth20_authorize.srf?client_id=CLIENT_ID&scope=SCOPES&response_type=code&redirect_uri=REDIRECT_URL Can any one please help me to get user-info? Is there any library that I need to include for that ? I'm getting authenticated code but I don't know how use ? I'm working with JAVA


Solution

  • The userinfo endpoint is https://apis.live.net/v5.0/me. Before you call it you need to exchange the code for a token.