Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,426 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to develop feature that will allows users to sign in with Microsoft. I read many articles and docs but almost all of them describe how to do that only for tenant-specific accounts. I don't want to add user accounts manually to my tenant app.
Here is my config:
spring:
security:
oauth2:
client:
registration:
microsoft:
authorization-grant-type: authorization_code
redirect-uri: http://localhost:8084/api/auth/azure/login/oauth2/code/microsoft
provider: microsoft
client-id: ****
client-secret: ****
scope:
- openid
- email
- profile
provider:
microsoft:
authorization-uri: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
token-uri: https://login.microsoftonline.com/common/oauth2/v2.0/token
user-info-uri: https://graph.microsoft.com/oidc/userinfo
user-name-attribute: sub
jwk-set-uri: https://login.microsoftonline.com/common/discovery/v2.0/keys
As i understand authorization-uri must contain 'common' part (not tenant-id). Also Azure Entra Id is configured to allow any types of account to sign in.
But i still can't login with external accounts.