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

Fix #10345 Microsoft Azure OAuth Redirect URL doesn't allow the query string. #10346

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

chris001
Copy link
Contributor

Description

Setting up MS Azure OAuth for email accounts was failing because Suite docs say use a Redirect URL containing a query string, and Azure forbids Redirect URLs with query strings.
My fix involves adding a line to the .htaccess to rewrite the incoming Redirect URL compatible with Microsoft Azure OAuth, to the query-string type of Redirect URL expected by Suite.

Motivation and Context

Microsoft Azure OAuth does not allow Redirect URL to have query strings, which is the exact type of URL Suite uses.

How To Test This

Try creating an application in Azure according to the documentation.
At one point, it will have you paste the Suite Redirect URL into Microsoft Azure application.
Paste the URL with query strings from the docs.
Azure will refuse to save it because query strings are not allowed.
Azure OAuth Redirect URL may not coontain a query string
Try again with the URL like this instead: https://suite.mysite.tld/entryPoint/setExternalOAuthToken
Azure will save this Redirect URL.
And Suite will accept the Redirect URL during the OAuth email account login, because Suite will internally rewrite the incoming Redirect URL from Azure, to the expected URL https://suite.mysite.tld/index.php?entryPoint=setExternalOAuthToken, Suite will receive the token back from Azure OAuth, making OAuth login to the MS Azure email account work.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@chris001 chris001 changed the title Fix #10345 Microsoft Azure OAuth Redirect URL cannot have query string. Fix #10345 Microsoft Azure OAuth Redirect URL doesn't allow the query string. Jan 31, 2024
@SuiteBot
Copy link

This pull request has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/oauth-redirect-url-breaking-change/91715/5

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

2 participants