Help Help Help. MS Teams Integration for conversational Virtual Agent

burn907
Tera Expert

6 Months in trying to setup MS Teams integration and have got absolutely nowhere. I am putting my faith in this wonderful community to help where SN Support have not.

 

We have a single M365 tenant that is shared across multiple divisions (large enterprise). There are multiple ServiceNow instances that would need to be configured to the single Microsoft Tenant.

 

Going through every single piece of documentation that has been thrown at us, we still cannot get conversational working.

 

We have the App Registration set. We are configuring "Connect multiple ServiceNow instances to your MS Teams tenant. The issue, I believe, is to do with the mapping of our users with the OAuth OIDC provider. Our Microsoft Tenant UPN and email do not match. ServiceNow assumes they do. No amount of changing the user_claim or user_field has worked.

 

Someone somewhere must also have a similar setup.

 

Appreciate any guidance.

 

Thank You

 

 

9 REPLIES 9

Hard luck mate.

 

Did you try to bring MS in call, and see of they can help or check.

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

I have yes. Had open case with MS on the side. It's a like a really bad tennis match 

Sorry, mate. I’ve shared my experience based on what I’ve seen. The only option is to ask for regular updates on the case and include higher management in the email thread.

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Terry_Yeti
Giga Expert

I ran your MS Teams Virtual Agent integration request through snowcoder ai. This is a common integration scenario, and I can walk you through the key steps.

## MS Teams + Virtual Agent Integration Setup

### Prerequisites
1. **Virtual Agent Admin role** (`virtual_agent_admin`) - you'll need this to configure the VA side
2. **MS Teams Spoke** installed from the ServiceNow Store
3. **Azure AD App Registration** with proper OAuth scopes configured

### High-Level Steps

**1. Azure Configuration**
- Register an app in Azure AD
- Configure Bot Channel Registration
- Note your App ID and generate a client secret
- Add Microsoft Graph API permissions (typically `ChannelMessage.Send`, `Team.ReadBasic.All`)

**2. ServiceNow Configuration**
- Navigate to **Virtual Agent > Channels > Microsoft Teams**
- Create a new MS Teams channel configuration
- Enter your Azure App ID and secret
- Configure the OAuth profile

**3. Common Gotchas**

Based on the MSTeamsErrorHandler patterns I've seen, watch for these errors:

- **401 Unauthorized** - Usually means your OAuth token is empty or scopes are wrong. Double-check your Azure app permissions and that admin consent was granted.
- **403 Forbidden** - Scope permissions issue. Verify the OAuth profile has the correct scopes.
- **404 with "No team found"** - The Team ID you're targeting doesn't exist or the bot doesn't have access.

**4. Testing**
- Add the bot to a Teams channel
- Send a message and verify VA responds
- Check the MS Teams integration logs in ServiceNow if issues occur

### Quick Troubleshooting

If the bot isn't responding:
1. Check **System Logs > All** filtered by "ms_teams"
2. Verify the webhook URL is correctly configured in Azure
3. Confirm the VA topic you want to trigger is published and active

What specific part of the integration are you stuck on? If you're hitting a particular error message, share it and I can point you to the exact fix.

_______________________________________
I used snowcoder ai to generate this. If you need to tweak the requirements, you can run it through their Yeti AI for free.

This is super helpful. We get 403. In the conversational logs it shows guest guest and pending on outbound