Image classification & Object detection: Cannot create a new workspace for Azure environment.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- azure, csharp
- Domain
- cloud, machine-learning
Research direction
Start with the reported Azure workspace creation flow, then read AzureResourceManager.cs around line 163 and NewWorkspaceDataContext.cs around line 136, where the failure is logged. Trace the storage-account creation request and verify the behavior against the Azure policy error. Done means the Image classification or Object detection Azure workspace can be created successfully under the reported environment.
Written by the indexing model from the issue text.
Description
System Information (please complete the following information):
Windows OS: Windows-11-Enterprise-24H2
ML.Net Model Builder 2022: 17.19.2.2522504 (Main Build)
Microsoft Visual Studio Enterprise: 2022(17.13.6)
.Net Core: 8.0,9.0
Describe the bug
- On which step of the process did you run into an issue:
Cannot create a new workspace for Azure environment.
TestMatrix
To Reproduce
Steps to reproduce the behavior:
- Select Create a new project from the Visual Studio start window.
- Choose the C# Console App (.NET Core) project template.
- Add model builder by right click on the project.
- Select "Image classification or Object detection" scenario.
- On the "Environment" page, choose "Azure" option and then click "Set up workspace" button.
- Choose "ML.NET Model Builder Demo" subscription and then click "New Workspace" link.
- Provide the name, regions, RG on the "Create new workspace" dialog, then click "Create" button.
- Model Builder error occurs: Resource 'fullloctest02storageafh' was disallowed by policy. Reasons: 'This request was denied due to internal policy. Local authentication methods are not allowed.
Expected behavior
Workspace can be created successfully.
Screenshot:
Additional context:
2025-04-29 07:12:05.4294 DEBUG Resource 'fullloctest02storageafh' was disallowed by policy. Reasons: 'This request was denied due to internal policy. Local authentication methods are not allowed. For more information, refer to https://aka.ms/safesecretsstandard.'. See error details for policy resource IDs.
Status: 403 (Forbidden)
ErrorCode: RequestDisallowedByPolicy
Content:
{"error":{"code":"RequestDisallowedByPolicy","target":"fullloctest02storageafh","message":"Resource 'fullloctest02storageafh' was disallowed by policy. Reasons: 'This request was denied due to internal policy. Local authentication methods are not allowed. For more information, refer to https://aka.ms/safesecretsstandard.'. See error details for policy resource IDs.","additionalInfo":[{"type":"PolicyViolation","info":{"evaluationDetails":{"evaluatedExpressions":[{"result":"True","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Storage/storageAccounts","targetValue":"Microsoft.Storage/storageAccounts","operator":"Equals"},{"result":"True","expressionKind":"Field","expression":"Microsoft.Storage/storageAccounts/allowSharedKeyAccess","path":"properties.allowSharedKeyAccess","expressionValue":"******","targetValue":"false","operator":"Exists"},{"result":"True","expressionKind":"Field","expression":"tags[Az.Sec.DisableLocalAuth.Storage::Skip]","path":"tags[Az.Sec.DisableLocalAuth.Storage::Skip]","targetValue":"false","operator":"Exists"},{"result":"True","expressionKind":"Value","expression":"[contains(resourceGroup().tags, parameters('skipTagName'))]","expressionValue":false,"targetValue":"false","operator":"Equals"},{"result":"True","expressionKind":"Value","expression":"[contains(subscription().tags, parameters('skipTagName'))]","expressionValue":false,"targetValue":"false","operator":"Equals"},{"result":"True","expressionKind":"Value","expression":"all_regions","expressionValue":"all_regions","targetValue":["all_regions"],"operator":"In"}],"reason":"This request was denied due to internal policy. Local authentication methods are not allowed. For more information, refer to https://aka.ms/safesecretsstandard."},"policyDefinitionId":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/policyDefinitions/8e7a35ba-088b-4288-9dd0-c01bbecdcdbc-1.0","policyDefinitionName":"8e7a35ba-088b-4288-9dd0-c01bbecdcdbc-1.0","policyDefinitionDisplayName":"Azure Storage Policy to disable local auth - Opt In-1.0","policyDefinitionVersion":"1.0.0","policyDefinitionEffect":"deny","policyAssignmentId":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/policyAssignments/SafeSec-Strg-OptIn-V1-0","policyAssignmentName":"SafeSec-Strg-OptIn-V1-0","policyAssignmentDisplayName":"Azure Storage Policy to disable local auth - Opt In-1.0","policyAssignmentScope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","policyAssignmentParameters":{"heavyRegions":["eastus"],"pilotRegions":["westcentralus","eastasia"],"effect":"deny","mediumRegions":["uksouth"],"canaryRegions":["centraluseuap","eastus2euap"],"regionCodeMapping":{"uaecentral":"auh","eastasia":"hk","japaneast":"ty","southcentralus":"sn","westus3":"usw3","eastus2euap":"cbn","canadaeast":"yq","australiasoutheast":"ml","uksouth":"ln","australiacentral2":"cbr2","southeastus":"usse1","jioindiacentral":"jinc","westcentralus":"cy","australiacentral":"cbr","centraluseuap":"cdm","norwayeast":"noe","northeurope":"db","brazilnortheast":"brne","brazilsouth":"cq","apacsoutheast2":"kul","italynorth":"itn","eastusslv":"use","malaysiasouth":"mys","australiaeast":"sy","centralindia":"pn","koreacentral":"se","malaysiawest":"myw","southafricawest":"cpt","francesouth":"mrs","westindia":"bm","eastus2":"bn","koreasouth":"ps","switzerlandnorth":"chn","israelcentral":"ilc","eastus":"bl","southcentralusstg":"ustsc","ukwest":"cw","swedensouth":"ses","uaenorth":"dxb","qatarcentral":"qac","brazilsoutheast":"brse","westus":"by","mexicocentral":"mxc","spaincentral":"esc","southafricanorth":"jnb","germanynorth":"den","germanywestcentral":"dewc","chilecentral":"clc","southeastasia":"sg","norwaywest":"now","koreasouth2":"krs2","jioindiawest":"jinw","westeurope":"am","taiwannorth":"twn","westus2":"mwh","northcentralus":"ch","taiwannorthwest":"twnw","newzealandnorth":"nzn","francecentral":"par","japanwest":"os","southindia":"ma","polandcentral":"plc","eastusstg":"uste","switzerlandwest":"chw","canadacentral":"yt","swedencentral":"sec","centralus":"dm","disabled":"."}},"policyExemptionIds":[],"policyEnrollmentIds":[]}}]}}
Headers:
Pragma: no-cache
x-ms-failure-cause: REDACTED
x-ms-request-id: ac5f458e-3aa1-4708-9164-a5ec802dd969
x-ms-correlation-request-id: REDACTED
x-ms-routing-request-id: REDACTED
Strict-Transport-Security: REDACTED
X-Content-Type-Options: REDACTED
X-Cache: REDACTED
X-MSEdge-Ref: REDACTED
Content-Length: 4301
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Tue, 29 Apr 2025 07:12:04 GMT
Expires: -1
at Azure.ResourceManager.Storage.StorageAccountsRestOperations.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.ResourceManager.Storage.StorageAccountCollection.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.RemoteResourceManager.AzureResourceManager.d__9.MoveNext() in //src/Microsoft.ML.ModelBuilder/RemoteResourceManager/AzureResourceManager.cs:line 163
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AzureAttach.NewWorkspaceDataContext.d__25.MoveNext() in //src/Microsoft.ML.ModelBuilder/AzureAttach/NewWorkspaceDataContext.cs:line 136 (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
2025-04-29 07:16:40.3162 DEBUG finalize EnvironmentViewModel_4 (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
2025-04-29 07:16:40.3162 DEBUG finalize TrainViewModel_13 (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
- Dominant language
- Dockerfile
- Stars
- 285
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/machinelearning-modelbuilder
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
dotnet/machinelearning-modelbuilder#3090 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
dotnet/machinelearning-modelbuilder#3087 · 5 comments · 2 reactions ·
All issues in dotnet/machinelearning-modelbuilder
Similar issues
-
documentation needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
hashicorp/terraform-provider-aws#50256 · 1 comment ·
Maintainers usually reply within 1 day
-
api: storage priority: p2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleapis/google-cloud-cpp#16529 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anomalyco/models.dev#8658 ·
Maintainers usually reply within 1 day
-
Language: Terraform :globe_with_meridians: Needs: Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Azure/terraform-azurerm-avm-res-app-managedenvironment#231 ·
Maintainers usually reply within 1 day