Closed
Description
"Allow Always" API Access Not Working in Microsoft Teams Copilot Declarative Agent
Issue Summary
When configuring an OpenAPI-based API in a Microsoft Teams Copilot Declarative Agent, API requests function correctly when "Allow Once" is selected. However, when "Allow Always" is chosen, subsequent API calls fail, preventing the agent from accessing the API persistently.
Steps to Reproduce
- Configure a Copilot Declarative Agent with an API-based plugin using an OpenAPI document.
- Ensure the API has proper authentication (OAuth2, Bearer Token) and is accessible, my case is no authentication (CORS only)
- Run a command in the Copilot Agent that triggers an API request.
- When prompted by Teams, select "Allow Once" → API works as expected.
- Repeat the process and select "Allow Always" when prompted.
- Try the same API call again → API request fails.
Expected Behavior
- When "Allow Always" is selected, API requests should continue working without additional permission prompts.
Actual Behavior
- API requests fail after choosing "Allow Always".
- Selecting "Allow Once" allows the API call to work only for that session but not persistently.
- No explicit error message appears in Teams, but F12 (DevTools) > Network Tab shows failed API requests.
Potential Causes
- Permission Caching Bug: Teams might not be properly caching the persistent API access setting.
- CORS/Access Control Policies: The API may reject requests when called persistently under "Allow Always" but not under "Allow Once".
- Copilot Plugin Scopes Issue: Teams might not be storing the authorization scope for persistent API access.
Workarounds Attempted
- Cleared permissions and reauthorized API → No effect.
- Manually added API to Allowed APIs list in Copilot manifest → No effect.
- Tested API with Postman (works fine, so API itself is not the issue).
- Restarted Teams & reinstalled Copilot Agent → No change.
Environment Details
- Copilot Declarative Agent: (09d4adba-7817-42c2-a01e-1a132f69d3ea)
- API Type: OpenAPI Azure Function App hosted in Azure (Rest API)
- Authentication Type: None
Priority & Impact
🔴 High Impact – This issue prevents persistent API access, forcing users to reauthorize every session, which is not a scalable solution for enterprise integrations.
Next Steps
- Could Microsoft Teams engineering confirm whether persistent API authorization is cached correctly in Copilot Declarative Agents?
- Is there a way to force Request Access or Missing Permission for "Allow Always" in API-based plugins?
- Can Teams provide logs or error messages when an API fails under "Allow Always"?
**Workaround Needed: ** Immediate fix or confirmation on expected behavior.