-
Notifications
You must be signed in to change notification settings - Fork 25
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
[GH-240] Add support for Microsoft National Clouds #428
base: master
Are you sure you want to change the base?
Conversation
@spirosoik can you assign someone from your team (or yourself) to look at this from an operations perspective? |
@JoKneeMo Can you please fix the failing CI and conflicts? |
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
I've been busy but plan to correct the issues and update the PR this week. |
@JoKneeMo Any updates on the above? |
@spirosoik bump |
Summary
This PR addresses #240 to add support for Microsoft National Cloud endpoints.
For my purposes I needed to connect with Microsoft GCC High.
I've added a new config item to select an Azure/Entra ID tenant type with support for Commercial, GCC/GCCH, US Gov (DoD), and China endpoints.
To address the login URLs, I overrode the oauth2/microsoft package to accept the tenant type config entry and return the proper endpoint.
Addressing the MS Graph API endpoints was a little more challenging.
The msgraph module was very out of date and did not support the SetURL function added 4 years ago.
That was added to the module to override the default url of
graph.microsoft.com
.The MSGraph endpoint is controlled using the same new config item and returns the proper graph url.
The tokens used by graph are not cross cloud compatible.
I'm unsure of how to write the unit test mockups in this repo.
Additional Information
This logic could also be applied to the mattermost-plugin-msteams plugin and would address mattermost/mattermost-plugin-msteams#514. However, that issue is not marked as Help Wanted for community contribution. I'd be happy to open a PR for that one too otherwise I will wait for Mattermost Support to resolve it.
Ticket Link
Fixes #240
UI Screenshot