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

[GH-240] Add support for Microsoft National Clouds #428

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

Conversation

JoKneeMo
Copy link

@JoKneeMo JoKneeMo commented Nov 3, 2024

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

image

@mattermost-build
Copy link

Hello @JoKneeMo,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@JoKneeMo JoKneeMo changed the title Add support for Microsoft National Clouds [GH-240] Add support for Microsoft National Clouds Nov 3, 2024
@wiggin77 wiggin77 added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Nov 6, 2024
@wiggin77
Copy link
Member

wiggin77 commented Nov 6, 2024

@spirosoik can you assign someone from your team (or yourself) to look at this from an operations perspective?

@raghavaggarwal2308
Copy link
Contributor

@JoKneeMo Can you please fix the failing CI and conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change Azure URL?
4 participants