Hello! I have an agent that has been built to answer benefit questions. There's an issue occurring when a user first installs the agent that I'm struggling to resolve.
This agent has a 'Benefit Questions' topic. That topic uses the Office 365 Users (get my profile V2) tool to get the user's country location and then branches based on that location to use only that location's knowledge sources in Generative answer nodes. The knowledge sources being used are SharePoint knowledge sources (both SharePoint connectors to pages, and the File-type SharePoint connector to document library folders). It uses Microsoft authentication.
When a new user installs the agent and asks a question, the agent:
1. Asks them to authorize the Office 365 connection.
2. After the user authorizes the Office 365 connection, it asks them to authorize the SharePoint connection.
3. After the user authorizes the SharePoint connection, it asks them a second time to authorize the SharePoint connection (this is weird, but not the biggest issue)
3. After the user authorizes the second SharePoint connection, the agent stalls and doesn't answer the original question. If having this discussion in a Teams chat, the agent will just not answer. If having this discussion in Copilot M365 Chat, sometimes it won't answer or it will send a message like "Sorry, I wasn't able to respond to that. Is there something else I can help with?", which is not a message set up in the original topic, Fallback, or On Error topics.
4. If the user sends a new message, or starts a new conversation, the agent is able to continue the conversation just fine.
This is an issue that is difficult to replicate because once those connections are set up and cached, even when removing the agent and re-installing it won't ask for re-authorization for the tools, so it typically requires having a new person install it. I have also never run into this behavior when testing in Copilot Studio even though those connection refresh and ask for re-authorization more often, so I've been unable to debug from there.
Any help would be appreciated!