401 PermissionDenied error when calling the Azure AI Studio project API

Steve Fisher 20 Reputation points
2025-07-10T17:49:32.5933333+00:00

Application with Service Principal ID 8b6a9b11-bbd2-4498-879c-5e8868261d76 is consistently receiving a 401 PermissionDenied error when calling the Azure AI Studio project API, despite having Owner-level permissions on the resource.

Failing API Call: GET https://mspsaturn-ai-central-resource.services.ai.azure.com/api/projects/mspSaturn-AI-Central/assistants/{assistantId}

Example Request ID from a failed call: f6403e5b-f84e-4c12-8cbc-dfeb762438ff

Troubleshooting Steps Already Taken:

Granted the Service Principal (8b6a9b11-...) the following roles directly on the mspsaturn-ai-central-resource scope: Azure AI Developer, Azure AI Account Owner, and AzureML Data Scientist.

Verified roles are correctly assigned via the Azure Portal (IAM) and Azure CLI (az role assignment list).

Attempted to add the Service Principal to the project via the AI Studio UI, but the "Add members" search box does not find service principals; it only finds users.

Confirmed application is using the correct credentials and endpoint URL.

Restarted the application service multiple times and waited over an hour for permission propagation.

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments

1 answer

Sort by: Newest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

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