Forum Discussion
JonnyBago82
Sep 18, 2024Copper Contributor
209 Invoke Validation Failed - Different Chat Contexts
Hi there, I have a strange issue. When using Teams (occurs in both Desktop and Web clients), I get this error when trying to call one of our APIs from an Adaptive Card: {
"errorCode": 0...
Sayali-MSFT
Sep 19, 2024Microsoft
JonnyBago82 - Thanks for reporting your issue.
We will check this at our end and will get back to you.
We will check this at our end and will get back to you.
- JonnyBago82Sep 19, 2024Copper ContributorThanks Sayali-MSFT - I look forward to your response.
- Sayali-MSFTSep 20, 2024Microsoft
JonnyBago82 -It sounds like you're encountering a permissions issue, The error "Invoke validation failed. User forbidden to perform action" with error code 209 typically occurs when there's a permission issue, often related to the user or bot not being authorized to perform the action in specific contexts like group chats or 1:1 chat, despite the correct scopes being configured in the manifest.
- Ensure that your API endpoint and the bot are authorized to be called in the context of group chats and 1:1 chat. Sometimes, additional permission configurations are needed to allow access when calling the API from different contexts.
- Ensure that the bot has the required permissions in Azure Active Directory (AAD). Check if the bot's Microsoft Graph API permissions (delegated or application) include the necessary scopes for the actions being attempted in group or personal chats.
- JonnyBago82Sep 20, 2024Copper ContributorThanks Sayali-MSFT.
In terms of point 1, I'm not sure what else I can change other than the Teams manifest, where I've added the correct scopes.
In terms of point 2, we don't use Microsoft Graph API for anything. The colleague search functionality is done via our own API.
Any other suggestions?
- Ensure that your API endpoint and the bot are authorized to be called in the context of group chats and 1:1 chat. Sometimes, additional permission configurations are needed to allow access when calling the API from different contexts.