2 Answers

You can refer to the following configuration description.

ClientID: {Application ID}
ClientSecret: {Secret}
Authorize URL: https://login.microsoftonline.com/{DirectoryID}/oauth2/v2.0/authorize
Token URL: https://login.microsoftonline.com/{DirectoryID}/oauth2/v2.0/token
User JSON URL: https://graph.microsoft.com/v1.0/me
User ID JSON Path: id
User Display Name JSON Path: displayName
User Username JSON Path: userPrincipalName
User Email JSON Path: userPrincipalName
User Avatar JSON Path: Blank - Nothing like this exists in Azure AD. Instead, it must be parsed from the values returned from https://graph.microsoft.com/v1.0/me coupled with this URL: https://graph.microsoft.com/v1.0/me/photo/$value
Check Email Verified: Off
Email Verified JSON Path: userPrincipalName
Scope: openid, User.Read

Reference

Hello,

I’d like to revisit this question because I’m encountering an issue with mentions in the comments. When a user registers via OAuth2 and their account is created, mentions in comments do not work. However, with a normal registration through Answer, everything works as expected.

Additionally, I suspect that the settings in Azure AD and the API permissions might also be relevant, right? I’m sharing my configuration for the OAuth2 plugin and the API permissions below.

If this topic would be better addressed as a separate question, please let me know, and I’ll create a new one. Thank you!

User JSON URL: https://graph.microsoft.com/v1.0/me
User ID JSON Path: id
User Display Name JSON Path: displayName
User Username JSON Path: userPrincipalName
User Email JSON Path: userPrincipalName
User Avatar JSON Path: Blank - Nothing like this exists in Azure AD. Instead, it must be parsed from the values returned from https://graph.microsoft.com/v1.0/me coupled with this URL: https://graph.microsoft.com/v1.0/me/photo/$value
Check Email Verified: Off
Email Verified JSON Path: userPrincipalName
Scope: openid, User.Read

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2024 Apache Answer Meta.