[GH-240] Add support for Microsoft National Clouds#428
[GH-240] Add support for Microsoft National Clouds#428JoKneeMo wants to merge 9 commits intomattermost:masterfrom
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 |
…lendar into feature/GCCH-Support
JoKneeMo
left a comment
There was a problem hiding this comment.
@Kshitij-Katiyar Thanks for the assist in getting the lint issues resolved. I've been too busy to get back to this.
@wiggin77 @spirosoik All conflicts look to be resolved now.
nickmisasi
left a comment
There was a problem hiding this comment.
One small nit - otherwise. LGTM. Thanks @JoKneeMo!
|
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
…lendar into feature/GCCH-Support
|
@wiggin77 We have resolved the conflicts on this PR. |
|
@AayushChaudhary0001 Please test this PR |
If your Azure account is commercial, there are no changes needed. If you're looking to validate the USGov, GCC, GCCH, and China endpoints, you would need to create a new Entra tenant (domain) in those products. I've validated GCCH and USGov with these changes. |
|
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
|
@AayushChaudhary0001 Did you need any further details? |
|
@arush-vashishtha To get a trial from that link for USGov or GCCH, you'll need a "sponsor" from a US Gov agency. |


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