Azure AI Foundry evaluation run fails with 403 UnauthorizedUserAction when account networking is restricted to Selected Networks

Marian Cap 25 Reputation points
2026-06-04T12:31:48.13+00:00

Hello,

We are facing an issue with Azure AI Foundry evaluations when the Foundry / Azure AI Services account is configured with network restrictions.

Environment

  • Resource type: Microsoft.CognitiveServices/accounts
  • Kind: AIServices
  • SKU: S0
  • Region: eastus2
  • Foundry project: proj-default
  • Public network access: Enabled
  • Network mode: Selected Networks and Private Endpoints
  • networkAcls.defaultAction: Deny
  • Bypass: AzureServices
  • IP allowlist configured
  • No private endpoints
  • No virtual network rules

Scenario

We are trying to create and submit an Azure AI Foundry evaluation from the Foundry portal.

The evaluation setup is:

  • Target: Agent
  • Scope: Individual turns
  • Data source: Existing traces
  • Dataset: Application Insights traces
  • Field mapping: default / unchanged
  • Criteria: default / unchanged

When submitting the evaluation run, the portal fails with:

Request failed with status code 400: The action cannot be finished with reason Response status code does not indicate success: 403 (Forbidden).

The failing request is:

POST https://<foundry-account>.cognitiveservices.azure.com/api/projects/proj-default/openai/v1/evals/<eval_id>/runs

The response body contains:

{
  "error": {
    "code": "UserError",
    "message": "The action cannnot be finished with reason Response status code does not indicate success: 403 (Forbidden).",
    "innerError": {
      "code": "UnauthorizedUserAction"
    }
  },
  "componentName": "raisvc",
  "statusCode": 400
}

RBAC already validated

We already granted the project managed identity the following roles:

  • Foundry User on the Foundry / Azure AI Services account
  • Log Analytics Reader on the connected Application Insights resource
  • Log Analytics Reader on the linked Log Analytics Workspace

After RBAC propagation, the issue still persisted.

Network test performed

We performed a controlled test to confirm whether the issue is caused by networking restrictions.

Initial state:

publicNetworkAccess = Enabled
networkAcls.defaultAction = Deny
bypass = AzureServices

Temporary test:

Changed networkAcls.defaultAction from Deny to Allow

Result:

The evaluation Submit action worked successfully.

Rollback:

Changed networkAcls.defaultAction back to Deny

After rollback, the resource was back to the secured state and the IP allowlist was preserved.

Conclusion

The issue appears to be caused by the Foundry evaluation backend / raisvc not being able to complete the evaluation run when the Foundry account is restricted to Selected Networks.

The evaluation works only when networkAcls.defaultAction is temporarily changed to Allow.

Questions

  1. Are Azure AI Foundry evaluations supported when the underlying Microsoft.CognitiveServices/accounts resource is configured with Selected Networks / networkAcls.defaultAction = Deny?
  2. If this scenario is supported, what is the required network configuration for the Foundry evaluation backend / raisvc?
  3. Is there a service tag, trusted service setting, managed private endpoint, or specific network rule that needs to be configured?
  4. Is Allow Azure services on the trusted services list expected to allow Foundry evaluation runs? It is already enabled on our resource, but the evaluation still fails unless defaultAction is set to Allow.
  5. What is the recommended production-safe configuration that allows Azure AI Foundry evaluations without setting the account to Allow all networks?

Thank you.

image (5)

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


Answer accepted by question author
Anshika Varshney 15,625 Reputation points Microsoft External Staff Moderator
2026-06-04T14:19:27.1666667+00:00

Hello @Marian Cap ,

This is a known limitation with Azure AI Foundry evaluations when network restrictions are configured. The evaluation backend service (raisvc) needs to reach your Cognitive Services account, but it's not being recognized as part of the trusted Azure services even when bypass = AzureServices is set.

Key findings from your testing:

  • Evaluation works when networkAcls.defaultAction = Allow
  • Evaluation fails when networkAcls.defaultAction = Deny (even with bypass = AzureServices)
  • RBAC roles are correctly configured (Foundry User, Log Analytics Reader)

Solutions:

Option 1: Use Private Endpoint (Production-safe) Configure a private endpoint for your Foundry account and ensure the evaluation backend can connect through it. Follow the configure private link documentation.

Option 2: Add Specific Service Tags The evaluation backend may require specific Azure service tags. Check if adding the AzureAIFoundry service tag (if available) to your IP allowlist resolves the issue.

Option 3: Temporary Allow with Monitoring If you must keep defaultAction = Deny, consider:

  • Keeping bypass = AzureServices
  • Adding your evaluation backend's source IPs to the allowlist (monitor Azure Firewall/NSG flow logs to identify them per this guidance)

I Hope this helps. Do let me know if you have any further queries.

Thankyou!

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Newest

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.