Add sovereign cloud support to AzureCloudInstance enum#5709
Add sovereign cloud support to AzureCloudInstance enum#5709
Conversation
Co-authored-by: bgavrilMS <[email protected]>
Co-authored-by: bgavrilMS <[email protected]>
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, |
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.