Why do I get the ResourceNotFoundError below even when I have performed all the necessary setup?

Ufedo Omale 45 Reputation points
2025-08-08T18:15:51.9566667+00:00

Question: Why do I get the ResourceNotFoundError below even when I have performed all the necessary setup?

Context: The error comes from cell/step 8 in notebook 4 of the finetuning and distillation guide. I am running my code in a Jupyter Notebook in the Azure Machine Learning Studio.

Code:


registered_model = ml_client.models.create_or_update(file_model)

Error:

ResourceNotFoundError: (ParentResourceNotFound) Failed to perform 'read' on resource(s) of type 'workspaces/datastores', because the parent resource '/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg-Lab329-AI-Env/providers/Microsoft.MachineLearningServices/workspaces/Lab329-AI-EnvProj' could not be found. Code: ParentResourceNotFound Message: Failed to perform 'read' on resource(s) of type 'workspaces/datastores', because the parent resource '/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg-Lab329-AI-Env/providers/Microsoft.MachineLearningServices/workspaces/Lab329-AI-EnvProj' could not be found.

Azure Machine Learning
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 22,806 Reputation points Volunteer Moderator
    2025-08-10T14:28:05.8433333+00:00

    Hello Ufedo Omale,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you always get ResourceNotFoundError error, even when you have performed all the necessary setup.

    There are many potential causes of the ResourceNotFoundError, including but not limited to:

    • Workspace misnaming
    • Soft-deleted workspace
    • Permissions issues
    • Deployment path errors
    1. Before you go deeper, check permissions to be sure your identity has Contributor or Owner access to:
      • The workspace
      • The resource group
      • The subscription
      Use Azure Portal > Workspace > Access Control (IAM) > Role Assignments to confirm this, if not assign the permission and check again.
    2. Verify workspace existence and if not found, check Recently Deleted Workspaces: From - Azure Portal > Azure ML > Recently Deleted - https://learn.microsoft.com/en-us/azure/machine-learning/concept-soft-delete?view=azureml-api-2
    3. If none of the above. Go to Azure Portal > Azure ML > Recently Deleted > Select Workspace > Click Recover - https://learn.microsoft.com/en-us/azure/machine-learning/concept-soft-delete?view=azureml-api-2
    4. Try to view model registration guide - as in https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-models?view=azureml-api-2
    5. Also, if above not working. Make sure the resource path in your code matches the actual Azure resource hierarchy: /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.MachineLearningServices/workspaces/<workspace-name> Check this reference - https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-parent-resource

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.