Azure ML Workspace Authentication with MLClient.from_config
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have the following Azure subscriptions and Azure Machine Learning service workspaces: You need to obtain a reference to the ml-project workspace. Solution: Run the following Python code: Does the solution meet the goal? -
- 
Community Votes
57% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests knowledge of the azure-ai-ml library's initialization methods, specifically trapping candidates who assume default authentication works without explicit configuration or credentials in code.
This question tests the correct syntax for authenticating Azure Machine Learning workspaces using the Python SDK. The community consensus indicates that the provided solution fails because it omits a required credential parameter.
Many candidates select 'Yes' (Option A) assuming that if they are logged into Azure CLI, the SDK will automatically pick up their identity without needing to pass a credential object explicitly in this specific method call context.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The suggested answer is B (No) because theMLClient.from_config() method in the modern azure-ai-ml package typically requires an identity or credential argument depending on the specific version and environment setup, especially when not relying on implicit environment variables. While from_config() reads configuration from a file, secure practices and many exam scenarios require explicit credential handling for production-grade references.Why the Other Options Are Wrong
Selecting Option A implies the code is sufficient. This is incorrect because the code snippet shown (implied by the context of comments) likely lacks the necessary credential instantiation or passes an incomplete object. In strict certification contexts, omitting explicit security parameters is considered a failure to meet best practices for workspace access.Community Comment Notes
Comment [1] argues for 'Yes' based on Azure CLI default auth, which is valid in local dev but often considered insufficient in exam logic requiring explicit code correctness. Comments [2], [3], and [6] correctly identify that thecredential parameter is mandatory or missing, leading to the correct conclusion that the solution does not meet the goal of obtaining a secure reference. Official Reference
Exam Strategy
Always verify if the SDK method requires explicit credential objects versus relying on environment defaults. In DP-100, prefer solutions that explicitly handle authentication rather than those assuming implicit context, unless the scenario specifically highlights a local development environment.