web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Custom agent with Shar...
Copilot Studio
Suggested Answer

Custom agent with Sharepoint knowledge does not ask user to allow connection

(2) ShareShare
ReportReport
Posted on by 29
Hi community,
 
I have created and published an agent having SharePoint as its knowledge source. Usually, when a user interact with the agent for the first time, the agent would ask the user to allow it to connect to SharePoint using the following chat dialog.
 
 
After publising this agent, I tested the agent in both MS Teams and M365 Copilot. In M365 Copilot, when I asked a question, the agent returned this dialog for me to press Allow before searching SharePoint and answer my question correctly. However, I tried the same question on the same agent in MS Teams, the agent did not return this dialog to me. Thus, I guessed the agent could not connect to SharePoint so that it could not answer my question.
 
Although I tried to remove the agent from MS Teams and reinstall it again, the problem still persists.
 
Have anyone had this issue? Are there anything I can do to make it work in MS Teams?
 
Categories:
I have the same question (2)
  • Suggested answer
    MParikh Profile Picture
    313 Super User 2025 Season 2 on at

    Normally, when the agent is used for the first time, it should prompt the user with the "Connect to continue" dialog so the user can allow SharePoint access.

    What you observed:
     
    • In M365 Copilot, the prompt appears as expected, and the agent connects to SharePoint.
    • In MS Teams, the same agent skips the consent dialog and fails to answer because it cannot connect to SharePoint.
    • Reinstalling the agent in Teams does not solve the issue.  
    Why this happens
     
    1. Different consent handling: Teams apps sometimes use cached tokens or integrated permissions, while M365 Copilot forces the dialog. If the Teams app fails to trigger OAuth consent, the agent never gets a valid access token.
    2. App manifest differences: If the agent’s app manifest doesn’t explicitly declare the SharePoint connection in Teams context, Teams won’t prompt for it.
    3. Token scope mismatch: The agent may be requesting permissions that Teams doesn’t automatically recognize, so no consent screen is shown.
    4. Bug/limitation: Since Copilot Studio with SharePoint integration is still evolving, this may be a product limitation or bug where Teams does not yet fully support the same connection prompts as M365 Copilot.  
    Things you can try
     
    • Verify connection settings: In Copilot Studio, check the SharePoint data connection. Remove and re-add it, then republish the agent.
    • Clear Teams cache: Sometimes Teams holds onto a broken app state. Sign out, clear Teams cache, then reinstall the agent.
    • Test app manifest: Open the agent’s Teams app manifest (JSON). Make sure the resource-specific consent (RSC) and delegated permissions for SharePoint are included.
    • Direct login: In Teams, before using the agent, go to the app’s “Connections” tab and see if you can sign in manually to SharePoint.
    • Tenant admin consent: Ask your admin if SharePoint delegated consent for Teams bots is blocked or requires admin approval.
  • Suggested answer
    DAnny3211 Profile Picture
    134 on at
    Hi,
    
    This behavior seems related to how MS Teams handles authentication flows differently compared to M365 Copilot. In Teams, certain dialogs—especially those involving consent or external connections—may not trigger automatically due to limitations in the embedded browser or Teams' sandboxing of web content.
    
    To address this, please verify the following:
    
    1. **Teams App Permissions**: Ensure the Teams app hosting the custom agent has the correct permissions declared in its manifest, especially for SharePoint access.
    2. **Authentication Flow**: If you're using OAuth 2.0, confirm that the redirect URI is compatible with Teams. Sometimes, Teams requires a different URI or additional configuration.
    3. **Adaptive Card or Bot Framework**: If the dialog is triggered via an adaptive card or bot response, check whether the card is rendering correctly in Teams. You might need to use a deep link or invoke a task module to simulate the consent dialog.
    4. **Known Limitations**: Microsoft has documented some differences in behavior between Copilot and Teams regarding authentication prompts. You can refer to the official documentation here:
       - Authentication in Teams apps
       - Copilot extensibility and plugin authentication
    
    If none of these resolve the issue, consider raising a support ticket with Microsoft, as this may be a platform-specific limitation or a bug.
    
    Thanks and best regards,  
    Daniele  
    **Note: This response was prepared with support from Copilot to ensure clarity and completeness.**

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 250 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 197 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 103 Moderator

Last 30 days Overall leaderboard