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
How to get userinfo with Microsoft OAuth after successfully authenticated
1k Views Asked by Sree At
2
There are 2 best solutions below
0
Arpit Agarwal
On
For anyone stumbling here.
OpenID discovery URL: https://login.live.com/.well-known/openid-configuration
Microsoft doesn't provide userinfo_endpoint in the service configuration json
UserInfo URL : https://graph.microsoft.com/v1.0/me
Make a GET request to this url with header containing access_token that you got after exchanging auth_code
Key: Authorization
Value: Bearer <access_token>
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in SERVLETS
- java ee jdbc jstl servlet connection to db
- IOException parsing XML document from ServletContext resource What throws this exception in my SpringBoot RESTweb service?
- How can i connect my 4 objects in my jsp file so it can run perfectly
- Best Practice to skip URL pattern's from getting applied servlet filter
- How to accurately replace scripts / html before saving data from servlet to database
- Servlet not displaying data obtained from dao
- flutter Multipart file upload server side error: Unable to process parts as no multi-part configuration has been provided
- Read an image file using okhttp3.RequestBody in java and send it to client using HTTPServletResponse
- Unexpected servlet config parameter contextConfigLocation=<NONE>
- The servlets named [ClassName] and [com.example.ClassName] are both mapped to the url-pattern [/ClassName] which is not permitted
- How to Use an External JAR Offline in a Maven Project for Servlets Without Internet Access?
- session.invalidate() is sometimes not working and not destroying the session object. What should I do?
- Database ConnectionError
- In a web.xml, can the url-pattern of servlet-mapping containing more than one path component? (e.g. /path/to/*))
- How to update the resource property using the valuemap in the Sling servlet?
Related Questions in OAUTH
- Lambda endpoint for the Google OAuth callback does not recieve the access_token
- Miro oauth api throws error 401 Invalid authorization code
- Error from Identity Provider - OIDC Scope Error
- get refresh token in axios interceptor
- How would single sign-on work for my multi-tenant application?
- How to get OAuth2 Access token from Postman
- How to use Oauth in order to log‑in on .googleapis.com on almost any arbitrary endpoints domains from the web browser?
- How to fix common 500 internal server error when use POST method on NEXTJS
- How to use a different account for OAuth with dbt-core and profiles.yml?
- ASP.NET Core Google external login issue
- Implementing IDP Initiated Flow Using OIDC
- Migration of UseOAuthAuthorizationServer from .Net Framework to .Net8
- Django Allauth Bad Request Error, Error Retrieving Access Token: Invalid Grant
- angular oauth 2 oidc doesn't work with github idp
- Handling oauth in flutter app without browser
Related Questions in OAUTH-2.0
- discord.py - Oauth2 - join user to guild
- Implementing Incremental consent when using both application and delegated permissions
- Verifying Google Identity OAuth2 token with Ruby
- spring security error Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: s
- Encountering HttpError 403 and 500 When Using Google Sheets API with Service Account
- get refresh token in axios interceptor
- spring error exception with oauth2 and securityconfig
- What oauth 2.0 endpoint is used to validate a bearer token
- Not enough permissions to access API request https://api.linkedin.com/v2/me
- How to specify the client ID and redirect URI in Swagger OAuth2.0 configuration for Swagger UI?
- OAuth2 PHP change invalid_token response
- Call Databricks API from an ASP.NET Core web application
- Secure to share Access Token over public API using CORs?
- How to use Oauth in order to log‑in on .googleapis.com on almost any arbitrary endpoints domains from the web browser?
- OAuth access token attribute based reverse proxying of http ressources
Related Questions in OAUTH-PROVIDER
- How to use a Named Credential within an Auth. Provider Pluggin?
- Firebase Linking provider SignIn not recognizing user
- How do I configure in Salesforce an OpenID Connect Auth.Provider with a third-party that authorizes via MyID?
- Can I use Supertokens with linkedin login oauth 2.0 as Third party provider ? How to do so?
- getting error {"error": "invalid_client"} when creating access token in django
- How to select and work with a particular Provider (OIDC provider) added on Google Could - Identity platform by using server side java code
- google as identity provider and oauth
- How can we use Apple Provider with Spring Security oauth2 client
- Android Firebase why do I get signed out after changing email?
- How to add authentication token in header of `APIClient` in `django rest_framework test`
- 3r Party AuthProvider - callback url redirect
- Flask-OAuthlib to implement OAuth implicit flow
- Spring OAuth2 API combine password grant AND third-party provider
- Android - How to link multiple Auth Providers to an account i.e google and Email/Password
- Enable oauth login with django-allauth but a custom provider
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The userinfo endpoint is
https://apis.live.net/v5.0/me. Before you call it you need to exchange thecodefor atoken.