Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth-oauth2: Resource Owner Email Mismatch #254

Closed

Conversation

protich
Copy link
Member

@protich protich commented Dec 3, 2022

When authorizing an email account to obtain a token - some providers, like Office365, allow for global admins to authorize on behalf of the accounts they manage. This is possible when OAuth2 plugin is NOT in strict mode (default: false) - however , on-authorization, the returned resource owner email is set to the authorizing admin email / account which in turn causes account / resource mismatch when the token is used onbehalf of resource owner.

This PR changes the plugin so that on mismatch and with strict mode set to false - the email address being authorized is set as the resource owner.

When authorizing an email account to obtain a token -  some providers, like
Office365, allow for global admins to authorize on behalf of the accounts they
manage. This is possible when OAuth2 plugin is NOT in strict mode (default:
false) - however , on-authorization, the returned resource owner email is set
to the authorizing admin email / account  which in turn causes account /
resource  mismatch when the token is used onbehalf of resource owner.

This commit changes the plugin so that on mismatch and with strict mode set to
false - the email address being authorized is set as the resource owner.
@MarcBanyard
Copy link
Contributor

There is an additional fix for the Microsoft 365 Shared Mailboxes in Pull Request #261 which resolves the issue some users have been reporting on the forums when it comes to being able to send emails from Shared Mailboxes.

Emails MUST be sent from a licenced Microsoft 365 User Mailbox, simply setting a password for a Shared mailbox is a breach of their licencing, so the above Pull Request ensures the tenant remains compliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants