An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
Thanks for the thorough testing. To your first question: the "Connect an Azure AI Search index to Foundry agents" page isn't fully consistent here. The prerequisites name the system-assigned managed identity of the Foundry account, while the troubleshooting table says the "project's managed identity". Both places list the same two roles at service scope: Search Index Data Contributor and Search Service Contributor.
What stands out in your results is that the only success came with the user-assigned identity, and your account has both a system-assigned and a user-assigned identity. When both exist, it isn't documented which one the tool picks for the token, and that ambiguity fits the "worked once, then denied" behaviour. Here's how I'd remove the guesswork:
- Give every candidate identity the same two roles at the search service scope (not index scope): the account system-assigned identity, the account user-assigned identity, and the project managed identity.
- Wait about 10 minutes for the role assignments to propagate before testing. Testing right after a change often still returns 403.
- Test with a brand-new agent version and a new conversation.
- Once it works consistently, remove the roles from one identity at a time and retest. That tells you which one the tool actually uses, so you can tighten permissions again.
- If you don't need the user-assigned identity on the Foundry account for anything else, removing it is the other clean option. The doc's documented path is the system-assigned one.
If it still fails with all three identities holding both roles at service scope, that's worth a support case. Include the request ID from the tool_user_error, but share it only in the ticket.
When it worked that one time, had you just assigned the roles to the user-assigned identity, or were they in place for a while?
If this resolved your issue, please consider accepting it as the answer. If the 403 persists with all identities granted, let me know and I'll be happy to keep helping.
Reference: