I am building an AI agent in Copilot Studio that will get the relevant information from the SharePoint document library and answer the user's query.
However, considering the data security, I want the agents to show the details of both internal and external shareable documents to the users. Still, I want to add a disclaimer stating that "no information is to be shared externally (if the document is categorized as Internal).
Tried approaches of metadata (doesn't fit my use cases since the uploads happen manually by the users), sensitivity label (during RAG, its getting the details, However, Ai is unable to get the senstivity label as "input"
Tried the approach by appending the string "Internal" or "External" to the naming convention. This is also not working since the Agent is unable to read it
Please help me with an approach to solve the above problem
Today it’s hard to make Copilot Studio reliably “read” your own Internal/External markers from names or ad‑hoc metadata, especially when files are uploaded manually.
A pattern that works better is:
Use SharePoint permissions / sensitivity labels to control what users can actually access.
Put Internal and External docs in separate libraries or clearly separated folders/sites, and add each as its own knowledge source.
In your agent instructions, say something like: “If the answer comes from the Internal library, include this disclaimer: ‘This information is internal and must not be shared externally.’ If it comes from the External library, no disclaimer.”
If you must stay in one library, make a required classification column and use a flow or approval step to enforce it, then call a custom action/flow in the agent to look up that value and add the disclaimer, instead of relying on pure RAG.
✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.
❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).
🏷️ For follow-ups @Sajeda_Sultana
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.