Share via

Azure AI Foundry custom Sentinel MCP tool with OAuth Identity Passthrough returns redirectUrl: null and fails when Refresh URL is set

Oleksandr Antoniuk 0 Reputation points
2026-03-03T19:57:31.53+00:00

I’m trying to follow the Microsoft documentation for adding a custom Sentinel MCP tool to an agent in Azure AI Foundry.

I am using:

  • Remote MCP server endpoint: https://sentinel.microsoft.com/mcp/custom/<collection-name>

Authentication: OAuth Identity Passthrough

Authorization URL: https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize

Token URL: https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token

Scope: <REDACTED on forum>/.default

Problem:

  • If I populate the Refresh URL field (using the same token endpoint), the connection creation fails.
  • If I leave Refresh URL blank, the connection is created successfully. But no follow-up wizzard with the redirect url appears
  • When I inspect the browser network response for the create request in Chrome DevTools, the response contains: "redirectUrl": null

So although the tool connection is created and I get a Project connection ID, no OAuth redirect URL is generated.

What I expected:

Based on the documentation, after clicking Connect, the custom OAuth setup should generate a redirect URL that can be copied into the Entra app registration.

What I’m seeing instead:

Refresh URL populated → creation fails

Refresh URL omitted → creation succeeds, but redirectUrl is null

Question:

Is this a known issue / preview limitation in Azure AI Foundry?

Should the Refresh URL currently be left blank as a workaround?

If so, why is the connection still returning redirectUrl: null?

Is there another required field or permission that would cause the redirect URL not to be generated?

Additional context:

  • The Entra app has delegated permissions configured.
  • I can see the saved tool in Foundry and it has a valid Project connection ID.
  • The redirect URL is not shown in the UI, and the backend response also confirms it is null.

Thank you. Note: PII redacted at supported side.

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


1 answer

Sort by: Most helpful
  1. Manas Mohanty 16,030 Reputation points Microsoft External Staff Moderator
    2026-04-05T04:35:17.8733333+00:00

    Hi Oleksandr Antoniuk

    Thank you for confirming that it worked (custom sentinel MCP server) in another region.

    We have requested the product group engineer for possible backend deletion for resource in Germany west Central region.

    We can also delete the Studio project then Foundry hub if the projects were in test phases.

    Attached CLI command to delete them via identifier id

    az resource delete \
      --ids /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<FOUNDRY_RESOURCE_NAME>
    
    

    Attached CLI commands to delete the stuck connections.

    Please copy the tool connection id from "Tools" tab as show in screenshot

    User's image

    Confirm the presence of tool connection from Cloud CLI

    az login --identity
    az rest \
      --method GET \
      --url "https://management.azure.com/subscriptions/<subid>/resourceGroups/AprilRG/providers/Microsoft.CognitiveServices/accounts/<foundryacctname>/projects/<projectname>/connections/MicrosoftLearnMCPserver?api-version=2025-04-01-preview"
    

    Delete the presence of tool connection from Cloud CLI

    az login --identity
    az rest \
      --method DELETE \
      --url 
    "https://management.azure.com/subscriptions/<subid>/resourceGroups/AprilRG/providers/Microsoft.CognitiveServices/accounts/<foundryacctname>/projects/<projectname>/connections/MicrosoftLearnMCPserver?api-version=2025-04-01-preview"
    
    

    Reference used - https://dori-uw-1.kuma-moon.com/en-us/cli/azure/resource?view=azure-cli-latest#az-resource-delete

    Please let me know if the issue persists at your side even with above remedial to delete stuck connection from Germany west central.

    Thank you for your inputs.


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.