Project Overview
We have developed a chatbot as an AI assistant for the company document repository. This chatbot is created using Azure Services, including Azure OpenAI and an Azure web application for the chat interface. The data source for the chatbot is SharePoint, we have currently morethan 4 SBUs and all the documents are stored in a sharepoint document repository in separate folders per SBU.
Azure App Services - chat bot is deployed using azure openai playgroud deployment as a web app option
Data Source - SharePoint
Azure AI Search is used to to search the documents (index, indexer), from the indexers we are extracting the meta data field as SBU which in each document we have defined.
Azure Openai gpt 4o used.
Requirement
When a user from a certain SBU asks a question from the chatbot, the bot should only retrieve the information/answers from that user’s registered SBU or from the Common (group-wide) documents.
please tell me how to achieve this in stepwise in detail (i am new the Azure)
#RAG application document retrieval based on the user using azure AD details
3 messages · Page 1 of 1 (latest)
Hi Interesting challenge
Here a getting started step by step
Step 1: Set Up Azure RBAC (Role-Based Access Control)
Navigate to Azure Portal: Go to the Azure portal and search for your Azure OpenAI resource.
Access Control (IAM): On the left navigation pane, select Access control (IAM).
Add Role Assignment: Select Add, then Add role assignment.
Assign Roles: Choose the appropriate role (e.g., Cognitive Services OpenAI User) and assign it to the user or group based on their Entra ID.
Step 2: Connect SharePoint to Azure Search
Create Data Source: In Azure Search, create a data source with the SharePoint Online endpoint and application ID.
Create Index: Create an index to enhance your search experience with metadata from your documents.
Extract Metadata: Use the indexer to extract metadata fields, such as SBU, from each document.
Step 3: Use Azure OpenAI with Indexed Data
Query Indexed Data: Use the indexed data in Azure Search to query with Azure OpenAI models.
Custom Connector: Set up a custom connector to bring this functionality into Power Apps or other applications.
Step 4: Ensure Proper Permissions
Check Permissions: Ensure that users have the necessary permissions to access the SharePoint documents and the Azure OpenAI resource.
Step 5: Implement Access Control Logic in Chatbot
Retrieve User SBU: When a user interacts with the chatbot, retrieve their SBU from their Entra ID.
Filter Documents: Use the retrieved SBU to filter documents and only retrieve information from the user's registered SBU or common documents.
Respond to User: Provide responses based on the filtered documents.
Some useful resources
https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/role-based-access-control?form=MG0AV3
https://learn.microsoft.com/en-us/azure/search/search-howto-index-sharepoint-online
https://learn.microsoft.com/en-us/AZURE/search/search-data-sources-gallery
hey thank you very much for the reply. i will follow this solution and get back to you asap.