How to setup call azure ai search knowledge bases on behalf of a user. Required detailed steps for production ready deployment

Bhaskar Adari 0 Reputation points
2026-08-24T11:53:20.2866667+00:00

I'm testing Azure AI Search Agentic Retrieval with a Remote SharePoint Knowledge Bases and have a few questions about the expected authentication model.

Retrieval works successfully when I use a user token obtained via:

az account get-access-token --resource https://search.azure.com

How shall i obtain this token through code. I have a chatbot which call this knowledge Bases

Azure AI Search
Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.


1 answer

Sort by: Newest
  1. Bhaskar Adari 0 Reputation points
    2026-08-25T08:22:33.41+00:00

    Thanks @Jose Benjamin Solis Nolasco

    Could you please pen down in detailed steps:
    What permissions are required for an Entra application to acquire delegated tokens for https://search.azure.com in an On-Behalf-Of flow for Azure AI Search Knowledge Bases with Remote SharePoint Knowledge Sources?

    Was this answer helpful?

    0 comments No comments

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.