Skip to content

[ACR] Update commands to support Regional Endpoints feature#33133

Open
lizMSFT wants to merge 1 commit intoAzure:devfrom
lizMSFT:zoeyli/acr/regional_endpoints_support
Open

[ACR] Update commands to support Regional Endpoints feature#33133
lizMSFT wants to merge 1 commit intoAzure:devfrom
lizMSFT:zoeyli/acr/regional_endpoints_support

Conversation

@lizMSFT
Copy link
Copy Markdown
Member

@lizMSFT lizMSFT commented Apr 3, 2026

Related command
az acr create/update/show
az acr show-endpoints
az acr login
az acr import

Description
Update az acr commands with the new flag to support Regional Endpoints feature

Testing Guide
az acr create:
image

az acr update:
image

az acr show:
image

az acr show-endpoints:
image
image

az acr login:
image

az acr import:
az_acr_import

History Notes
[ACR] az acr create: Add --regional-endpoints parameter to enable or disable regional endpoints for a container registry.
[ACR] az acr update: Add --regional-endpoints parameter to enable or disable regional endpoints for an existing container registry.
[ACR] az acr show-endpoints: Display regional endpoint host names when regional endpoints are enabled.
[ACR] az acr login: Add --endpoint parameter to log in to a specific regional endpoint of a container registry.
[ACR] az acr import: Support importing images using regional endpoint URIs as the source.


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings April 3, 2026 17:51
@lizMSFT lizMSFT requested a review from NoriZC as a code owner April 3, 2026 17:51
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 3, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Azure CLI acr command module to support the ACR Regional Endpoints feature, adding new CLI parameters and updating tests/recordings to validate the behavior across create/update/show/show-endpoints/login/import.

Changes:

  • Add --regional-endpoints support to az acr create and az acr update, including validation for Premium SKU and DCT incompatibility.
  • Extend az acr show-endpoints output to include regional endpoints, and add az acr login --endpoint to target a specific regional endpoint.
  • Update az acr import to accept regional endpoint URIs as source registries, with new unit/scenario tests and refreshed recordings.

Reviewed changes

Copilot reviewed 19 out of 32 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/acr/import.py Adds regional-endpoint URI normalization for ACR import source registry resolution.
src/azure-cli/azure/cli/command_modules/acr/custom.py Adds regional endpoint enablement/validation, regional endpoint listing in show-endpoints, and login targeting a regional endpoint.
src/azure-cli/azure/cli/command_modules/acr/_params.py Wires up new CLI arguments: --regional-endpoints and --endpoint (preview).
src/azure-cli/azure/cli/command_modules/acr/_help.py Adds help examples for regional endpoints across create/update/login/import/show-endpoints.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_regional_endpoint_utils.py Adds unit tests for regional endpoint URI conversion utility.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_regionalendpoint_scenario.py Adds scenario coverage for create/update/show/show-endpoints and basic login/import validations.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_check_name_availability.yaml Updates recording metadata for name availability test.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_check_name_availability_dnl_scope.yaml Updates recording metadata for DNL scope name availability test.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_with_public_network_access.yaml Updates recording metadata for public network access scenario.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_with_public_network_access_disabled.yaml Updates recording metadata for public network access disabled scenario.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_login.yaml Adds new recording for acr login scenario in regional endpoints context.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_login_expose_token.yaml Adds new recording for acr login expose-token scenario (needs JSON fix per comments).
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_import_no_wait.yaml Updates recording for acr import no-wait scenario (needs JSON fix per comments).
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_create_with_regional_endpoints_disabled.yaml Adds new recording validating create/update flows with regional endpoints disabled/enabled.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_create_with_domain_name_label_scope_name_in_use.yaml Updates recording metadata for DNL name-in-use scenario.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_create_abac.yaml Updates recording to redact tokens and refresh token flows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +124 to +125
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoey_dct_rg/providers/Microsoft.ContainerRegistry/registries/zoeydct0922","name":"zoeydct0922","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-22T16:59:00.2524234Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-09-22T16:59:00.2524234Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeytestrg/providers/Microsoft.ContainerRegistry/registries/zoeytestacr0402","name":"zoeytestacr0402","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"uksouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:02:13.1468128Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:09:34.6009939Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeycr","name":"zoeycr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-27T05:09:40.3291909Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-09T00:23:06.7636601Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeylocalcr","name":"zoeylocalcr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T20:31:39.2746934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T20:35:02.9066397Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeylirg/providers/Microsoft.ContainerRegistry/registries/zoeytestkrs","name":"zoeytestkrs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"koreasouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-03T21:53:36.2717073Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-02-03T21:53:36.2717073Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubtlooq6fpioky74bs2un","name":"sourceregistrysamesubtlooq6fpioky74bs2un","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-01T17:33:00.9939832Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-01T17:33:00.9939832Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgigxqzybakfitecm4uee5zxfl6aiqbsaev2t4w43j3wgeytmfbjhdxm4q4na5sln6p/providers/Microsoft.ContainerRegistry/registries/cliregkdfi3b3mocdi5e","name":"cliregkdfi3b3mocdi5e","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.4959235Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.4959235Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubukkys6mhexcveowosic","name":"sourceregistrysamesubukkys6mhexcveowosic","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.0697217Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.0697217Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ContainerRegistry/registries/testreghbgcvpcigbbt2uic6s","name":"testreghbgcvpcigbbt2uic6s","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentityn6fndszynarctkhxxb":{"principalId":"6d0e4351-db6e-4eb3-8241-bd02e49be2d3","clientId":"16b01e2c-dacc-4704-af7e-72dcfec357a6"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.2701934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:35.4627489Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwx746vu7dluofxfbt3emvzfyrerrjrb3zhnryqgy2zohddhucdmhnnzhgxhkfel3a/providers/Microsoft.ContainerRegistry/registries/testregab7oinshhhxeg","name":"testregab7oinshhhxeg","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:54.0604569Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:54.0604569Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgv7velr7dqw6acbztw2z77gkrqut2daah3lc4742zv4m7dpxjrwd7r3acyac2nwg3j/providers/Microsoft.ContainerRegistry/registries/testregysc3m6e6afvlx","name":"testregysc3m6e6afvlx","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:20.5036465Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:20.5036465Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnqd27yz3gsipcwlxo4j5hgyygdfeoy4zxemhouvfm3lm5hsahocnofxi7qcy3tusq/providers/Microsoft.ContainerRegistry/registries/testreggdfu2vybmmjpi","name":"testreggdfu2vybmmjpi","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rgnqd27yz3gsipcwlxo4j5hgyygdfeoy4zxemhouvfm3lm5hsahocnofxi7qcy3tusq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity5uatbqkp":{"principalId":"faf57c49-f552-41a3-b9f1-9317f5059fa1","clientId":"52af17ae-88d0-4382-9c77-a3bd70957ee2"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:22.6789286Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:22.6789286Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:38.4115761Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:38.4115761Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.ContainerRegistry/registries/zoeycr0707","name":"zoeycr0707","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"principalId":"4154e2a9-5c25-4d90-af38-983a675a0394","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned,
UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/zoeyumi":{"principalId":"ca03812b-c688-4f4c-9ba0-11fbbefcbb32","clientId":"f040c27b-aba8-4b61-9eb6-4baf06dbe35c"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2022-07-07T02:33:57.1740353Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-05T06:44:34.8009732Z"}}]}'
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recorded ARM response body contains a JSON string value split across lines (e.g., identity.type becomes "SystemAssigned,\n UserAssigned"). This produces invalid JSON in the playback response body and can break deserialization during test replay. Re-record or edit the recording so the JSON string is a single line (or the newline is escaped as \n within the JSON string).

Suggested change
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoey_dct_rg/providers/Microsoft.ContainerRegistry/registries/zoeydct0922","name":"zoeydct0922","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-22T16:59:00.2524234Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-09-22T16:59:00.2524234Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeytestrg/providers/Microsoft.ContainerRegistry/registries/zoeytestacr0402","name":"zoeytestacr0402","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"uksouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:02:13.1468128Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:09:34.6009939Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeycr","name":"zoeycr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-27T05:09:40.3291909Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-09T00:23:06.7636601Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeylocalcr","name":"zoeylocalcr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T20:31:39.2746934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T20:35:02.9066397Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeylirg/providers/Microsoft.ContainerRegistry/registries/zoeytestkrs","name":"zoeytestkrs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"koreasouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-03T21:53:36.2717073Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-02-03T21:53:36.2717073Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubtlooq6fpioky74bs2un","name":"sourceregistrysamesubtlooq6fpioky74bs2un","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-01T17:33:00.9939832Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-01T17:33:00.9939832Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgigxqzybakfitecm4uee5zxfl6aiqbsaev2t4w43j3wgeytmfbjhdxm4q4na5sln6p/providers/Microsoft.ContainerRegistry/registries/cliregkdfi3b3mocdi5e","name":"cliregkdfi3b3mocdi5e","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.4959235Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.4959235Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubukkys6mhexcveowosic","name":"sourceregistrysamesubukkys6mhexcveowosic","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.0697217Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.0697217Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ContainerRegistry/registries/testreghbgcvpcigbbt2uic6s","name":"testreghbgcvpcigbbt2uic6s","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentityn6fndszynarctkhxxb":{"principalId":"6d0e4351-db6e-4eb3-8241-bd02e49be2d3","clientId":"16b01e2c-dacc-4704-af7e-72dcfec357a6"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.2701934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:35.4627489Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwx746vu7dluofxfbt3emvzfyrerrjrb3zhnryqgy2zohddhucdmhnnzhgxhkfel3a/providers/Microsoft.ContainerRegistry/registries/testregab7oinshhhxeg","name":"testregab7oinshhhxeg","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:54.0604569Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:54.0604569Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgv7velr7dqw6acbztw2z77gkrqut2daah3lc4742zv4m7dpxjrwd7r3acyac2nwg3j/providers/Microsoft.ContainerRegistry/registries/testregysc3m6e6afvlx","name":"testregysc3m6e6afvlx","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:20.5036465Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:20.5036465Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnqd27yz3gsipcwlxo4j5hgyygdfeoy4zxemhouvfm3lm5hsahocnofxi7qcy3tusq/providers/Microsoft.ContainerRegistry/registries/testreggdfu2vybmmjpi","name":"testreggdfu2vybmmjpi","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rgnqd27yz3gsipcwlxo4j5hgyygdfeoy4zxemhouvfm3lm5hsahocnofxi7qcy3tusq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity5uatbqkp":{"principalId":"faf57c49-f552-41a3-b9f1-9317f5059fa1","clientId":"52af17ae-88d0-4382-9c77-a3bd70957ee2"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:22.6789286Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:22.6789286Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:38.4115761Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:38.4115761Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.ContainerRegistry/registries/zoeycr0707","name":"zoeycr0707","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"principalId":"4154e2a9-5c25-4d90-af38-983a675a0394","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned,
UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/zoeyumi":{"principalId":"ca03812b-c688-4f4c-9ba0-11fbbefcbb32","clientId":"f040c27b-aba8-4b61-9eb6-4baf06dbe35c"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2022-07-07T02:33:57.1740353Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-05T06:44:34.8009732Z"}}]}'
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoey_dct_rg/providers/Microsoft.ContainerRegistry/registries/zoeydct0922","name":"zoeydct0922","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-22T16:59:00.2524234Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-09-22T16:59:00.2524234Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeytestrg/providers/Microsoft.ContainerRegistry/registries/zoeytestacr0402","name":"zoeytestacr0402","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"uksouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:02:13.1468128Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:09:34.6009939Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeycr","name":"zoeycr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-27T05:09:40.3291909Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-09T00:23:06.7636601Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeylocalcr","name":"zoeylocalcr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T20:31:39.2746934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T20:35:02.9066397Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeylirg/providers/Microsoft.ContainerRegistry/registries/zoeytestkrs","name":"zoeytestkrs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"koreasouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-03T21:53:36.2717073Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-02-03T21:53:36.2717073Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubtlooq6fpioky74bs2un","name":"sourceregistrysamesubtlooq6fpioky74bs2un","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-01T17:33:00.9939832Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-01T17:33:00.9939832Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgigxqzybakfitecm4uee5zxfl6aiqbsaev2t4w43j3wgeytmfbjhdxm4q4na5sln6p/providers/Microsoft.ContainerRegistry/registries/cliregkdfi3b3mocdi5e","name":"cliregkdfi3b3mocdi5e","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.4959235Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.4959235Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubukkys6mhexcveowosic","name":"sourceregistrysamesubukkys6mhexcveowosic","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.0697217Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.0697217Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ContainerRegistry/registries/testreghbgcvpcigbbt2uic6s","name":"testreghbgcvpcigbbt2uic6s","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentityn6fndszynarctkhxxb":{"principalId":"6d0e4351-db6e-4eb3-8241-bd02e49be2d3","clientId":"16b01e2c-dacc-4704-af7e-72dcfec357a6"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.2701934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:35.4627489Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwx746vu7dluofxfbt3emvzfyrerrjrb3zhnryqgy2zohddhucdmhnnzhgxhkfel3a/providers/Microsoft.ContainerRegistry/registries/testregab7oinshhhxeg","name":"testregab7oinshhhxeg","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:54.0604569Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:54.0604569Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgv7velr7dqw6acbztw2z77gkrqut2daah3lc4742zv4m7dpxjrwd7r3acyac2nwg3j/providers/Microsoft.ContainerRegistry/registries/testregysc3m6e6afvlx","name":"testregysc3m6e6afvlx","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:20.5036465Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:20.5036465Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnqd27yz3gsipcwlxo4j5hgyygdfeoy4zxemhouvfm3lm5hsahocnofxi7qcy3tusq/providers/Microsoft.ContainerRegistry/registries/testreggdfu2vybmmjpi","name":"testreggdfu2vybmmjpi","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rgnqd27yz3gsipcwlxo4j5hgyygdfeoy4zxemhouvfm3lm5hsahocnofxi7qcy3tusq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity5uatbqkp":{"principalId":"faf57c49-f552-41a3-b9f1-9317f5059fa1","clientId":"52af17ae-88d0-4382-9c77-a3bd70957ee2"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:22.6789286Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:22.6789286Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:32:38.4115761Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:32:38.4115761Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.ContainerRegistry/registries/zoeycr0707","name":"zoeycr0707","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"principalId":"4154e2a9-5c25-4d90-af38-983a675a0394","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/zoeyumi":{"principalId":"ca03812b-c688-4f4c-9ba0-11fbbefcbb32","clientId":"f040c27b-aba8-4b61-9eb6-4baf06dbe35c"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2022-07-07T02:33:57.1740353Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-05T06:44:34.8009732Z"}}]}'

Copilot uses AI. Check for mistakes.
Comment on lines +130 to +131
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoey_dct_rg/providers/Microsoft.ContainerRegistry/registries/zoeydct0922","name":"zoeydct0922","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-22T16:59:00.2524234Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-09-22T16:59:00.2524234Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeytestrg/providers/Microsoft.ContainerRegistry/registries/zoeytestacr0402","name":"zoeytestacr0402","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"uksouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:02:13.1468128Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:09:34.6009939Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeycr","name":"zoeycr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-27T05:09:40.3291909Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-09T00:23:06.7636601Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeylocalcr","name":"zoeylocalcr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T20:31:39.2746934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T20:35:02.9066397Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeylirg/providers/Microsoft.ContainerRegistry/registries/zoeytestkrs","name":"zoeytestkrs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"koreasouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-03T21:53:36.2717073Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-02-03T21:53:36.2717073Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubtlooq6fpioky74bs2un","name":"sourceregistrysamesubtlooq6fpioky74bs2un","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-01T17:33:00.9939832Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-01T17:33:00.9939832Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgismgwaz3gs4jh6k4p4nrfoqdqyrm3zk6chz2zbyua6h7wfnnbw32kynbs5jhzqa3d/providers/Microsoft.ContainerRegistry/registries/cliregya3dxyctjruw66","name":"cliregya3dxyctjruw66","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:34.5552822Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:49.5242554Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgq57fdbkyd3fvbud7kwghd6ahpa6xiod5wolbj5baeofnucqwt2udef5jzleqpfttu/providers/Microsoft.ContainerRegistry/registries/cliregvemlzlnydppolo","name":"cliregvemlzlnydppolo","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.1288554Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.1288554Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgigxqzybakfitecm4uee5zxfl6aiqbsaev2t4w43j3wgeytmfbjhdxm4q4na5sln6p/providers/Microsoft.ContainerRegistry/registries/cliregkdfi3b3mocdi5e","name":"cliregkdfi3b3mocdi5e","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.4959235Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.4959235Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgr3dncnjhkhalqjdkz4u6l34oh3tufzxghel4ub2ume252fdiqhp32dfhl3e6hpfwi/providers/Microsoft.ContainerRegistry/registries/cliregkuwv3js2njdms6","name":"cliregkuwv3js2njdms6","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:41.0988194Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:41.0988194Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgskx5xmllutzic3c4doeja6nunvjlw5ip5llji7yoyui2s2sdsjzqt7xc6x3ch37ds/providers/Microsoft.ContainerRegistry/registries/cliregx4qtlyoqdmn6sb","name":"cliregx4qtlyoqdmn6sb","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:42.4933257Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:42.4933257Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesub000002","name":"sourceregistrysamesub000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.0697217Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.0697217Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ContainerRegistry/registries/testreghbgcvpcigbbt2uic6s","name":"testreghbgcvpcigbbt2uic6s","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.2701934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.2701934Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxwvyrtent72abwzwxrwncr35m2ohqfm7clis7n4vqspws3glosyc5nuljfsw7vamw/providers/Microsoft.ContainerRegistry/registries/cliregepl273n344ifcd","name":"cliregepl273n344ifcd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.5401873Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.5401873Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgq2a4j7wu6xkilhpjxuufph3nwbdm75g2ztiiw6k5jnbql3u3zh5yy5vqzh67o74jb/providers/Microsoft.ContainerRegistry/registries/cliregacdoolry56ojkb","name":"cliregacdoolry56ojkb","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:45.829285Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:45.829285Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgqxojiwdbpeqmfztvfmshztwrf76fmfnjutlzt55bfw7lfgsy6t5bkycedcabzdw7a/providers/Microsoft.ContainerRegistry/registries/clireg47q3fu3ep2lkjv","name":"clireg47q3fu3ep2lkjv","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:45.9354887Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:45.9354887Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.ContainerRegistry/registries/zoeycr0707","name":"zoeycr0707","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"principalId":"4154e2a9-5c25-4d90-af38-983a675a0394","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned,
UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/zoeyumi":{"principalId":"ca03812b-c688-4f4c-9ba0-11fbbefcbb32","clientId":"f040c27b-aba8-4b61-9eb6-4baf06dbe35c"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2022-07-07T02:33:57.1740353Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-05T06:44:34.8009732Z"}}]}'
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recorded ARM response body has a JSON string value broken by a literal newline (identity.type appears as "SystemAssigned,\n UserAssigned"). This makes the response body invalid JSON during VCR playback and may cause the SDK to fail parsing it. Please re-record or modify the body so it stays valid JSON (no literal newlines inside JSON strings unless escaped as \n).

Suggested change
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoey_dct_rg/providers/Microsoft.ContainerRegistry/registries/zoeydct0922","name":"zoeydct0922","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-22T16:59:00.2524234Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-09-22T16:59:00.2524234Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeytestrg/providers/Microsoft.ContainerRegistry/registries/zoeytestacr0402","name":"zoeytestacr0402","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"uksouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:02:13.1468128Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:09:34.6009939Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeycr","name":"zoeycr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-27T05:09:40.3291909Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-09T00:23:06.7636601Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeylocalcr","name":"zoeylocalcr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T20:31:39.2746934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T20:35:02.9066397Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeylirg/providers/Microsoft.ContainerRegistry/registries/zoeytestkrs","name":"zoeytestkrs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"koreasouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-03T21:53:36.2717073Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-02-03T21:53:36.2717073Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubtlooq6fpioky74bs2un","name":"sourceregistrysamesubtlooq6fpioky74bs2un","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-01T17:33:00.9939832Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-01T17:33:00.9939832Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgismgwaz3gs4jh6k4p4nrfoqdqyrm3zk6chz2zbyua6h7wfnnbw32kynbs5jhzqa3d/providers/Microsoft.ContainerRegistry/registries/cliregya3dxyctjruw66","name":"cliregya3dxyctjruw66","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:34.5552822Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:49.5242554Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgq57fdbkyd3fvbud7kwghd6ahpa6xiod5wolbj5baeofnucqwt2udef5jzleqpfttu/providers/Microsoft.ContainerRegistry/registries/cliregvemlzlnydppolo","name":"cliregvemlzlnydppolo","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.1288554Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.1288554Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgigxqzybakfitecm4uee5zxfl6aiqbsaev2t4w43j3wgeytmfbjhdxm4q4na5sln6p/providers/Microsoft.ContainerRegistry/registries/cliregkdfi3b3mocdi5e","name":"cliregkdfi3b3mocdi5e","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.4959235Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.4959235Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgr3dncnjhkhalqjdkz4u6l34oh3tufzxghel4ub2ume252fdiqhp32dfhl3e6hpfwi/providers/Microsoft.ContainerRegistry/registries/cliregkuwv3js2njdms6","name":"cliregkuwv3js2njdms6","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:41.0988194Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:41.0988194Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgskx5xmllutzic3c4doeja6nunvjlw5ip5llji7yoyui2s2sdsjzqt7xc6x3ch37ds/providers/Microsoft.ContainerRegistry/registries/cliregx4qtlyoqdmn6sb","name":"cliregx4qtlyoqdmn6sb","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:42.4933257Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:42.4933257Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesub000002","name":"sourceregistrysamesub000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.0697217Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.0697217Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ContainerRegistry/registries/testreghbgcvpcigbbt2uic6s","name":"testreghbgcvpcigbbt2uic6s","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.2701934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.2701934Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxwvyrtent72abwzwxrwncr35m2ohqfm7clis7n4vqspws3glosyc5nuljfsw7vamw/providers/Microsoft.ContainerRegistry/registries/cliregepl273n344ifcd","name":"cliregepl273n344ifcd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.5401873Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.5401873Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgq2a4j7wu6xkilhpjxuufph3nwbdm75g2ztiiw6k5jnbql3u3zh5yy5vqzh67o74jb/providers/Microsoft.ContainerRegistry/registries/cliregacdoolry56ojkb","name":"cliregacdoolry56ojkb","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:45.829285Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:45.829285Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgqxojiwdbpeqmfztvfmshztwrf76fmfnjutlzt55bfw7lfgsy6t5bkycedcabzdw7a/providers/Microsoft.ContainerRegistry/registries/clireg47q3fu3ep2lkjv","name":"clireg47q3fu3ep2lkjv","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:45.9354887Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:45.9354887Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.ContainerRegistry/registries/zoeycr0707","name":"zoeycr0707","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"principalId":"4154e2a9-5c25-4d90-af38-983a675a0394","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned,
UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/zoeyumi":{"principalId":"ca03812b-c688-4f4c-9ba0-11fbbefcbb32","clientId":"f040c27b-aba8-4b61-9eb6-4baf06dbe35c"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2022-07-07T02:33:57.1740353Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-05T06:44:34.8009732Z"}}]}'
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoey_dct_rg/providers/Microsoft.ContainerRegistry/registries/zoeydct0922","name":"zoeydct0922","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-22T16:59:00.2524234Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-09-22T16:59:00.2524234Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeytestrg/providers/Microsoft.ContainerRegistry/registries/zoeytestacr0402","name":"zoeytestacr0402","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"uksouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:02:13.1468128Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:09:34.6009939Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeycr","name":"zoeycr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-27T05:09:40.3291909Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-09T00:23:06.7636601Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeycrrg/providers/Microsoft.ContainerRegistry/registries/zoeylocalcr","name":"zoeylocalcr","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T20:31:39.2746934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T20:35:02.9066397Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zoeylirg/providers/Microsoft.ContainerRegistry/registries/zoeytestkrs","name":"zoeytestkrs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"koreasouth","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-02-03T21:53:36.2717073Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-02-03T21:53:36.2717073Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesubtlooq6fpioky74bs2un","name":"sourceregistrysamesubtlooq6fpioky74bs2un","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-01T17:33:00.9939832Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-01T17:33:00.9939832Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgismgwaz3gs4jh6k4p4nrfoqdqyrm3zk6chz2zbyua6h7wfnnbw32kynbs5jhzqa3d/providers/Microsoft.ContainerRegistry/registries/cliregya3dxyctjruw66","name":"cliregya3dxyctjruw66","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:34.5552822Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:49.5242554Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgq57fdbkyd3fvbud7kwghd6ahpa6xiod5wolbj5baeofnucqwt2udef5jzleqpfttu/providers/Microsoft.ContainerRegistry/registries/cliregvemlzlnydppolo","name":"cliregvemlzlnydppolo","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.1288554Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.1288554Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgigxqzybakfitecm4uee5zxfl6aiqbsaev2t4w43j3wgeytmfbjhdxm4q4na5sln6p/providers/Microsoft.ContainerRegistry/registries/cliregkdfi3b3mocdi5e","name":"cliregkdfi3b3mocdi5e","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:35.4959235Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:35.4959235Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgr3dncnjhkhalqjdkz4u6l34oh3tufzxghel4ub2ume252fdiqhp32dfhl3e6hpfwi/providers/Microsoft.ContainerRegistry/registries/cliregkuwv3js2njdms6","name":"cliregkuwv3js2njdms6","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:41.0988194Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:41.0988194Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgskx5xmllutzic3c4doeja6nunvjlw5ip5llji7yoyui2s2sdsjzqt7xc6x3ch37ds/providers/Microsoft.ContainerRegistry/registries/cliregx4qtlyoqdmn6sb","name":"cliregx4qtlyoqdmn6sb","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:42.4933257Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:42.4933257Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroupsamesub/providers/Microsoft.ContainerRegistry/registries/sourceregistrysamesub000002","name":"sourceregistrysamesub000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.0697217Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.0697217Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoorwmpas4a5cj4mgixfpcwsepkvp5lzmocg5mdxehwfwf3e7mpv47z6vpad4nlskp/providers/Microsoft.ContainerRegistry/registries/testreghbgcvpcigbbt2uic6s","name":"testreghbgcvpcigbbt2uic6s","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.2701934Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.2701934Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxwvyrtent72abwzwxrwncr35m2ohqfm7clis7n4vqspws3glosyc5nuljfsw7vamw/providers/Microsoft.ContainerRegistry/registries/cliregepl273n344ifcd","name":"cliregepl273n344ifcd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:44.5401873Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:44.5401873Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgq2a4j7wu6xkilhpjxuufph3nwbdm75g2ztiiw6k5jnbql3u3zh5yy5vqzh67o74jb/providers/Microsoft.ContainerRegistry/registries/cliregacdoolry56ojkb","name":"cliregacdoolry56ojkb","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:45.829285Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:45.829285Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgqxojiwdbpeqmfztvfmshztwrf76fmfnjutlzt55bfw7lfgsy6t5bkycedcabzdw7a/providers/Microsoft.ContainerRegistry/registries/clireg47q3fu3ep2lkjv","name":"clireg47q3fu3ep2lkjv","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-04-03T02:29:45.9354887Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-04-03T02:29:45.9354887Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.ContainerRegistry/registries/zoeycr0707","name":"zoeycr0707","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"principalId":"4154e2a9-5c25-4d90-af38-983a675a0394","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/zoeyumi":{"principalId":"ca03812b-c688-4f4c-9ba0-11fbbefcbb32","clientId":"f040c27b-aba8-4b61-9eb6-4baf06dbe35c"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2022-07-07T02:33:57.1740353Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-05T06:44:34.8009732Z"}}]}'

Copilot uses AI. Check for mistakes.
Comment on lines +125 to +145
parts = uri.split('.')

if len(parts) == 5 and parts[2] == 'geo' and uri.endswith(login_server_suffix):
return f"{parts[0]}{login_server_suffix}"

# If not a regional endpoint format, return as-is
return uri


def _get_azure_registry(cmd, source_registry):
"""Get Azure registry from login server URI or registry name, handling regional endpoint URI."""
lookup_uri = source_registry

# Try to get the pre-defined login server suffix.
login_server_suffix = get_login_server_suffix(cmd.cli_ctx)
# Convert regional endpoint to standard format if applicable
if login_server_suffix and source_registry.endswith(f".geo{login_server_suffix}"):
lookup_uri = _regional_endpoint_uri_to_login_server(source_registry, login_server_suffix)

# Search by login server (lookup_uri) and registry name (source_registry) to handle both URI and name inputs
return get_registry_from_name_or_login_server(cmd.cli_ctx, lookup_uri, source_registry)
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regional-endpoint detection/conversion is case-sensitive (endswith + parts[2] == 'geo'). If users pass an uppercase/mixed-case login server (common for hostnames), conversion will be skipped and the registry lookup will fail because the regional endpoint hostname won't match any registry loginServer. Consider normalizing source_registry/uri via .strip().lower() for the .endswith() checks and parts[...] comparisons, while still returning the original-cased input when no conversion applies.

Copilot uses AI. Check for mistakes.
Comment on lines +101 to +104
# using --expose-token and --endpoint at the same time is not supported
with self.assertRaises(CLIError) as ex:
self.cmd('acr login -n {} --expose-token --endpoint westus'.format(registry_name))

Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with self.assertRaises(CLIError) as ex: assigns ex but never uses it. This can trigger unused-variable lint checks in some configurations. If you don't need to assert on the exception message, consider dropping the as ex binding.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants