[AutoPR @azure-arm-cloudhealth] Fix sovereign cloud authentication by deriving AAD scope from endpoint URL#38818
Open
azure-sdk wants to merge 3 commits into
Open
[AutoPR @azure-arm-cloudhealth] Fix sovereign cloud authentication by deriving AAD scope from endpoint URL#38818azure-sdk wants to merge 3 commits into
azure-sdk wants to merge 3 commits into
Conversation
…config.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: '969cdf203d7093f4947ddaea9bc10010c7b6de83' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6394388 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the @azure/arm-cloudhealth management-plane SDK generated output to align with the 2026-01-01-preview API version from azure-rest-api-specs (commit 969cdf203d7093f4947ddaea9bc10010c7b6de83), including updated paging/LRO behavior, public exports, and refreshed samples.
Changes:
- Updates generated API-layer operations to default
api-versionto2026-01-01-preview, and wiresapi-versioninto paging + LRO polling flows. - Adds cloud environment helpers (
AzureClouds/cloudSetting) and expands the Entities surface area + samples (ingest health report, get signal history, get history). - Refreshes metadata, changelog, CODEOWNERS labeling, and sample build configs/artifacts for the new API version.
Reviewed changes
Copilot reviewed 144 out of 145 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/cloudhealth/arm-cloudhealth/warp.config.yml | Updates warp build exports/entry points (generated config). |
| sdk/cloudhealth/arm-cloudhealth/tsp-location.yaml | Bumps the spec repo commit SHA for generation provenance. |
| sdk/cloudhealth/arm-cloudhealth/test/public/utils/recordedClient.ts | Type-only import cleanup for recorder types. |
| sdk/cloudhealth/arm-cloudhealth/test/public/healthCloud.spec.ts | Type-only import cleanup + minor loop style fix in a skipped test. |
| sdk/cloudhealth/arm-cloudhealth/src/static-helpers/urlTemplate.ts | Refactors url-template helpers; adds post-expansion normalization. |
| sdk/cloudhealth/arm-cloudhealth/src/static-helpers/pollingHelpers.ts | Adds support for appending api-version to LRO polling requests. |
| sdk/cloudhealth/arm-cloudhealth/src/static-helpers/pagingHelpers.ts | Adds support for api-version + GET/POST nextLink paging. |
| sdk/cloudhealth/arm-cloudhealth/src/static-helpers/cloudSettingHelpers.ts | Adds cloud environment enum + ARM endpoint resolver helper. |
| sdk/cloudhealth/arm-cloudhealth/src/restorePollerHelpers.ts | Expands restore-poller deserializer mapping and carries api-version for polling. |
| sdk/cloudhealth/arm-cloudhealth/src/models/index.ts | Reorganizes exports (explicit export type list + Known* enums). |
| sdk/cloudhealth/arm-cloudhealth/src/index.ts | Updates public exports, including new models/types and cloud setting exports. |
| sdk/cloudhealth/arm-cloudhealth/src/cloudHealthClient.ts | Import hygiene (import type) for generated client wiring. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/signalDefinitions/index.ts | Updates classic layer to return pollers for LRO ops. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/relationships/index.ts | Updates classic layer to return pollers for LRO ops. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/operations/index.ts | Import hygiene (import type) for classic operations group. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/index.ts | Uses export type re-exports for classic layer interfaces. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/healthModels/index.ts | Import hygiene + removes stale reserved-word fixme comments. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/entities/index.ts | Adds new entity operations (ingest/report/history) + LRO pollers. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/discoveryRules/index.ts | Updates classic discovery rules to LRO pollers + create input type change. |
| sdk/cloudhealth/arm-cloudhealth/src/classic/authenticationSettings/index.ts | Updates classic auth settings to LRO pollers. |
| sdk/cloudhealth/arm-cloudhealth/src/api/signalDefinitions/options.ts | Adds updateIntervalInMs to LRO options types. |
| sdk/cloudhealth/arm-cloudhealth/src/api/signalDefinitions/operations.ts | Updates API version defaults, paging options, and LRO poller-returning ops. |
| sdk/cloudhealth/arm-cloudhealth/src/api/signalDefinitions/index.ts | Converts re-exports to export type for options. |
| sdk/cloudhealth/arm-cloudhealth/src/api/relationships/options.ts | Adds updateIntervalInMs to LRO options types. |
| sdk/cloudhealth/arm-cloudhealth/src/api/relationships/operations.ts | Updates API version defaults, paging options, and LRO poller-returning ops. |
| sdk/cloudhealth/arm-cloudhealth/src/api/relationships/index.ts | Converts re-exports to export type for options. |
| sdk/cloudhealth/arm-cloudhealth/src/api/operations/options.ts | Switches to import type for OperationOptions. |
| sdk/cloudhealth/arm-cloudhealth/src/api/operations/operations.ts | Updates API version defaults and paging iterator options. |
| sdk/cloudhealth/arm-cloudhealth/src/api/operations/index.ts | Converts re-exports to export type for options. |
| sdk/cloudhealth/arm-cloudhealth/src/api/index.ts | Splits value vs type exports (createCloudHealth vs context/options types). |
| sdk/cloudhealth/arm-cloudhealth/src/api/healthModels/options.ts | Switches to import type for OperationOptions. |
| sdk/cloudhealth/arm-cloudhealth/src/api/healthModels/index.ts | Converts re-exports to export type for options. |
| sdk/cloudhealth/arm-cloudhealth/src/api/entities/options.ts | Adds new option types for new entity operations + LRO interval options. |
| sdk/cloudhealth/arm-cloudhealth/src/api/entities/index.ts | Exposes new entity operations and option types. |
| sdk/cloudhealth/arm-cloudhealth/src/api/discoveryRules/options.ts | Adds updateIntervalInMs to LRO options types. |
| sdk/cloudhealth/arm-cloudhealth/src/api/discoveryRules/operations.ts | Updates API version defaults and LRO poller-returning ops; create input type change. |
| sdk/cloudhealth/arm-cloudhealth/src/api/discoveryRules/index.ts | Converts re-exports to export type for options. |
| sdk/cloudhealth/arm-cloudhealth/src/api/cloudHealthContext.ts | Adds cloudSetting and makes apiVersion optional; updates auth/client construction. |
| sdk/cloudhealth/arm-cloudhealth/src/api/authenticationSettings/options.ts | Adds updateIntervalInMs to LRO options types. |
| sdk/cloudhealth/arm-cloudhealth/src/api/authenticationSettings/index.ts | Converts re-exports to export type for options. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/tsconfig.json | Updates sample TS build configuration (generated). |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/signalDefinitionsListByHealthModelSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/signalDefinitionsGetSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/signalDefinitionsDeleteSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/signalDefinitionsCreateOrUpdateSample.ts | Updates sample metadata and request body shape/values. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/relationshipsListByHealthModelSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/relationshipsGetSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/relationshipsDeleteSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/relationshipsCreateOrUpdateSample.ts | Updates sample metadata and request body tags. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/operationsListSample.ts | Updates sample metadata and fixes placeholder subscriptionId length. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/healthModelsUpdateSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/healthModelsListBySubscriptionSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/healthModelsListByResourceGroupSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/healthModelsGetSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/healthModelsDeleteSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/healthModelsCreateSample.ts | Updates sample metadata and request body shape. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/entitiesListByHealthModelSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/entitiesIngestHealthReportSample.ts | Adds a new sample for ingesting a health report. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/entitiesGetSignalHistorySample.ts | Adds a new sample for fetching signal time series history. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/entitiesGetSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/entitiesGetHistorySample.ts | Adds a new sample for fetching entity health state transition history. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/entitiesDeleteSample.ts | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/src/entitiesCreateOrUpdateSample.ts | Updates sample metadata and request body shape for new entity model. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/README.md | Refreshes sample index + run instructions and adds new samples to the listing. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/typescript/package.json | Updates sample dependencies/TS toolchain versions (generated). |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/signalDefinitionsListByHealthModelSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/signalDefinitionsGetSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/signalDefinitionsDeleteSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/signalDefinitionsCreateOrUpdateSample.js | Updates sample metadata and request body shape/values. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/relationshipsListByHealthModelSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/relationshipsGetSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/relationshipsDeleteSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/relationshipsCreateOrUpdateSample.js | Updates sample metadata and request body tags. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/README.md | Refreshes sample index + run instructions and adds new samples to the listing. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/package.json | Updates sample dependencies and adds cross-env devDependency (generated). |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/operationsListSample.js | Updates sample metadata and fixes placeholder subscriptionId length. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/healthModelsUpdateSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/healthModelsListBySubscriptionSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/healthModelsListByResourceGroupSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/healthModelsGetSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/healthModelsDeleteSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/healthModelsCreateSample.js | Updates sample metadata and request body shape. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/entitiesListByHealthModelSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/entitiesIngestHealthReportSample.js | Adds a new JS sample for ingesting a health report. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/entitiesGetSignalHistorySample.js | Adds a new JS sample for fetching signal time series history. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/entitiesGetSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/entitiesGetHistorySample.js | Adds a new JS sample for fetching entity health state transition history. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/entitiesDeleteSample.js | Updates sample metadata to 2026-01-01-preview. |
| sdk/cloudhealth/arm-cloudhealth/samples/v1-beta/javascript/entitiesCreateOrUpdateSample.js | Updates sample metadata and request body shape for new entity model. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/signalDefinitionsListByHealthModelSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/signalDefinitionsGetSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/signalDefinitionsDeleteSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/signalDefinitionsCreateOrUpdateSample.ts | Updates dev-sample metadata and request body tags/threshold types. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/relationshipsListByHealthModelSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/relationshipsGetSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/relationshipsDeleteSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/relationshipsCreateOrUpdateSample.ts | Updates dev-sample metadata and request body tags. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/operationsListSample.ts | Updates dev-sample metadata and fixes placeholder subscriptionId length. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/healthModelsUpdateSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/healthModelsListBySubscriptionSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/healthModelsListByResourceGroupSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/healthModelsGetSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/healthModelsDeleteSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/healthModelsCreateSample.ts | Updates dev-sample metadata and request body shape. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/entitiesListByHealthModelSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/entitiesIngestHealthReportSample.ts | Adds a new dev-sample for ingesting a health report. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/entitiesGetSignalHistorySample.ts | Adds a new dev-sample for fetching signal time series history. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/entitiesGetSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/entitiesGetHistorySample.ts | Adds a new dev-sample for fetching entity health state transition history. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/entitiesDeleteSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/entitiesCreateOrUpdateSample.ts | Updates dev-sample request body shape for new entity model. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/discoveryRulesListByHealthModelSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/discoveryRulesGetSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/discoveryRulesDeleteSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/discoveryRulesCreateOrUpdateSample.ts | Updates dev-sample request body shape (specification wrapper). |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/authenticationSettingsListByHealthModelSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/authenticationSettingsGetSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/authenticationSettingsDeleteSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/samples-dev/authenticationSettingsCreateOrUpdateSample.ts | Updates dev-sample metadata to 2026-01-01-preview and import ordering. |
| sdk/cloudhealth/arm-cloudhealth/package.json | Bumps @azure/core-lro dependency version range. |
| sdk/cloudhealth/arm-cloudhealth/metadata.json | Updates emitter/version metadata and cross-language definition mappings. |
| sdk/cloudhealth/arm-cloudhealth/CHANGELOG.md | Updates initial preview release entry text/date. |
| pnpm-lock.yaml | Updates lockfile for dependency range changes. |
| .github/CODEOWNERS | Adjusts CODEOWNERS PR label comment for the package path. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…loud URL Co-authored-by: hjscherer <12544697+hjscherer@users.noreply.github.com>
Copilot
AI
changed the title
[AutoPR @azure-arm-cloudhealth]-generated-from-SDK Generation - JS-6394388
[arm-cloudhealth] Fix AAD scope to use dynamic endpoint URL for sovereign cloud support
Jun 4, 2026
Copilot
AI
changed the title
[arm-cloudhealth] Fix AAD scope to use dynamic endpoint URL for sovereign cloud support
[AutoPR @azure-arm-cloudhealth] Fix sovereign cloud authentication by deriving AAD scope from endpoint URL
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packages impacted by this PR
@azure/arm-cloudhealthIssues associated with this PR
N/A
Describe the problem that is addressed by this PR
The default AAD scope in
createCloudHealthwas hard-coded to"https://management.azure.com/.default"(the public cloud endpoint). This caused authentication to break when using sovereign cloud endpoints (China, USGov) or custom ARM endpoints via thecloudSettingoption, unless callers manually overrodeoptions.credentials.scopes.The fix derives the default scope dynamically from the resolved
endpointUrl, with trailing slash normalization to avoid producing//.default:What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
The only sensible approach is to derive the scope from the already-resolved
endpointUrl(which already accounts forcloudSettingand custom endpoints). Hard-coding the public cloud URL is incorrect for sovereign clouds.Are there test cases added in this PR? (If not, why?)
No. This is a generated SDK package and the change is minimal and targeted.
Provide a list of related PRs (if any)
N/A
Checklists