Add sovereign cloud support to AzureCloudInstance enum#5709
Conversation
d72646f to
a59c9a6
Compare
There was a problem hiding this comment.
Pull request overview
This PR exposes newly supported sovereign clouds (Bleu/France, Delos/Germany, GovSG/Singapore) through the public AzureCloudInstance enum and wires them into authority host resolution, with unit tests validating authority construction for common AAD audiences.
Changes:
- Add
AzureBleu,AzureDelos, andAzureGovSGtoAzureCloudInstance. - Map the new enum values to their login hosts in
AuthorityInfo.GetCloudUrl(). - Extend
PublicClientApplicationBuilderTeststo cover the new clouds across multiple authority audiences.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Microsoft.Identity.Test.Unit/AppConfigTests/PublicClientApplicationBuilderTests.cs | Adds authority-construction test cases for the three new clouds across multiple audiences. |
| src/client/Microsoft.Identity.Client/AppConfig/AzureCloud.cs | Extends the public AzureCloudInstance enum with three sovereign cloud values. |
| src/client/Microsoft.Identity.Client/AppConfig/AuthorityInfo.cs | Adds URL mappings for the new enum values used when constructing AAD authorities. |
| AzureBleu, | ||
|
|
||
| /// <summary> | ||
| /// Azure Delos sovereign cloud (Germany). Maps to https://login.sovcloud-identity.de | ||
| /// </summary> | ||
| AzureDelos, | ||
|
|
||
| /// <summary> | ||
| /// Azure GovSG sovereign cloud (Singapore). Maps to https://login.sovcloud-identity.sg | ||
| /// </summary> | ||
| AzureGovSG, |
There was a problem hiding this comment.
These new enum members are a public API surface change. The repo uses PublicApiAnalyzers with per-TFM API baselines; please add the new AzureCloudInstance members (AzureBleu=5, AzureDelos=6, AzureGovSG=7) to the corresponding src/client/Microsoft.Identity.Client/PublicApi/<tfm>/PublicAPI.Unshipped.txt files (or move to Shipped if appropriate), otherwise the public API analyzer will fail the build.
| AzureBleu, | |
| /// <summary> | |
| /// Azure Delos sovereign cloud (Germany). Maps to https://login.sovcloud-identity.de | |
| /// </summary> | |
| AzureDelos, | |
| /// <summary> | |
| /// Azure GovSG sovereign cloud (Singapore). Maps to https://login.sovcloud-identity.sg | |
| /// </summary> | |
| AzureGovSG, | |
| AzureBleu = 5, | |
| /// <summary> | |
| /// Azure Delos sovereign cloud (Germany). Maps to https://login.sovcloud-identity.de | |
| /// </summary> | |
| AzureDelos = 6, | |
| /// <summary> | |
| /// Azure GovSG sovereign cloud (Singapore). Maps to https://login.sovcloud-identity.sg | |
| /// </summary> | |
| AzureGovSG = 7, |
|
hello, any chance this can be prioritized in the upcoming releases ? Really need this in our projects ! |
| /// </summary> | ||
| AzureBleu, | ||
|
|
||
| /// <summary> |
There was a problem hiding this comment.
The three new enum values are public API surface. All six per-TFM PublicAPI.Unshipped.txt files need to be updated, which is why 2/7 CI checks are currently failing.
Add the following lines to each src/client/Microsoft.Identity.Client/PublicApi/<tfm>/PublicAPI.Unshipped.txt:
Microsoft.Identity.Client.AzureCloudInstance.AzureBleu = 5 -> Microsoft.Identity.Client.AzureCloudInstance
Microsoft.Identity.Client.AzureCloudInstance.AzureDelos = 6 -> Microsoft.Identity.Client.AzureCloudInstance
Microsoft.Identity.Client.AzureCloudInstance.AzureGovSG = 7 -> Microsoft.Identity.Client.AzureCloudInstance
TFMs to update: net462, net472, net8.0, net8.0-android, net8.0-ios, netstandard2.0.
|
|
Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
a59c9a6 to
9214341
Compare
Changes proposed in this request
PR #5671 added instance discovery support for Bleu (France), Delos (Germany), and GovSG (Singapore) sovereign clouds, but the
AzureCloudInstanceenum was not updated to expose them.This PR adds:
AzureBleu,AzureDelos,AzureGovSGAuthorityInfo.GetCloudUrl()for the new cloudsDevelopers can now use the enum instead of hardcoding URLs:
Testing
Added 9 test cases covering all three new clouds with
AzureAdMultipleOrgs,AzureAdAndPersonalMicrosoftAccount, andPersonalMicrosoftAccountaudiences.Performance impact
None. Changes are additive enum values and switch cases.
Documentation
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.