diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index ac874829bfb4..2cc4c2e49093 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -372,7 +372,11 @@ def __init__( self._service_client_07_2024_preview = ServiceClient072024Preview( credential=self._credential, - subscription_id=self._operation_scope._subscription_id, + subscription_id=( + self._ws_operation_scope._subscription_id + if registry_reference + else self._operation_scope._subscription_id + ), base_url=base_url, **kwargs, )