Skip to content

Commit f9b457b

Browse files
authored
Create registry client after credential_scopes are added to kwargs (Azure#29364)
1 parent 72b4e4b commit f9b457b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sdk/ml/azure-ai-ml/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Bugs Fixed
1010

11+
- Fixed an issue affecting authentication to registry-related services in sovereign regions.
12+
1113
### Breaking Changes
1214

1315
### Other Changes

sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ def __init__(
216216
)
217217
module_logger.debug("Cloud configured in MLClient: '%s'.", cloud_name)
218218

219+
# Add cloud information to kwargs
220+
kwargs.update(_get_cloud_information_from_metadata(cloud_name))
221+
219222
# registry_name is present when the operations need referring assets from registry.
220223
# the subscription, resource group, if provided, will be ignored and replaced by
221224
# whatever is received from the registry discovery service.
@@ -248,7 +251,6 @@ def __init__(
248251

249252
base_url = _get_base_url_from_metadata(cloud_name=cloud_name, is_local_mfe=True)
250253
self._base_url = base_url
251-
kwargs.update(_get_cloud_information_from_metadata(cloud_name))
252254
self._kwargs = kwargs
253255

254256
self._operation_container = OperationsContainer()

0 commit comments

Comments
 (0)