
Answer-first summary for fast verification
Answer: No
The solution does NOT meet the goal because the MLClient.from_config() method requires a credential parameter, which is missing in the provided code. According to the Microsoft documentation and the community discussion with higher upvotes, the credential parameter is mandatory for authentication. While some comments mention alternative authentication methods like Azure CLI login or managed identity, these are automatic fallbacks that still require the credential parameter to be handled appropriately by the SDK internally. The code as written will fail because the required credential parameter is not provided.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You have the following Azure subscriptions and Azure Machine Learning service workspaces:
ml-prod in resource group rg-miml-project in resource group rg-mlYou need to obtain a reference to the ml-project workspace.
Solution: Run the following Python code:
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='sub-id-2',
resource_group='rg-ml')
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='sub-id-2',
resource_group='rg-ml')
Does the solution meet the goal?

A
Yes
B
No