Integrations

ServiceNow Microsoft Teams Integration Guide

intermediateOAuth 2.0 with Client Credentials grant type using Microsoft Graph APIMicrosoft Teams

The ServiceNow Microsoft Teams integration enables seamless collaboration between IT teams by bringing ServiceNow workflows directly into Teams channels and chats. This integration solves the problem of context switching between applications by allowing users to receive incident notifications, approve requests, and interact with ServiceNow records without leaving their primary collaboration platform. IT administrators, service desk agents, and business users benefit from real-time notifications and streamlined approval processes. The integration supports bi-directional communication through the Microsoft Teams spoke in Integration Hub, enabling both inbound webhook notifications from ServiceNow to Teams channels and outbound actions like adaptive card interactions that update ServiceNow records. The primary automation pattern uses Flow Designer workflows triggered by ServiceNow business rule changes, and the integration components are managed through the Integration Hub module and the ServiceNow Store Teams application.

Prerequisites

  • ServiceNow Quebec release or later with Integration Hub Professional license
  • Microsoft Teams administrator access with ability to install custom apps
  • Microsoft Azure Active Directory application registration permissions
  • ServiceNow admin role or integration_admin role for Flow Designer access
  • Microsoft 365 Business Standard or Enterprise license for advanced Teams features
  • ServiceNow for Microsoft Teams app installed from Microsoft Teams App Store
  • Integration Hub activated and Microsoft Teams spoke installed from ServiceNow Store

Architecture Overview

The ServiceNow Microsoft Teams integration primarily uses the Microsoft Teams spoke within Integration Hub, which provides pre-built actions for posting messages, sending adaptive cards, and managing Teams channels. Authentication is established through OAuth 2.0 using Microsoft Graph API credentials stored in ServiceNow Connection & Credential Alias records, with the Connection Alias referencing the Microsoft Graph endpoint (https://graph.microsoft.com). Data flows are primarily uni-directional from ServiceNow to Teams for notifications, with bi-directional capability through adaptive card responses that trigger ServiceNow Scripted REST APIs for approval workflows. A MID Server is not required as the integration uses direct HTTPS connections to Microsoft Graph API, but organizations with strict firewall policies may need to configure outbound access to graph.microsoft.com on port 443. Microsoft Graph API enforces throttling limits of up to 10,000 API requests per 10 minutes per application, and the Teams spoke includes built-in retry logic to handle rate limiting scenarios gracefully.

Sourdough
Chrome Extension

Sourdough: ServiceNow Monitoring and Analytics

A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.

Instance HealthGraphs & ChartsAPI HealthDeveloper ToolsQuick SearchInstance Switcher
Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Implementation Steps

1

Register Microsoft Azure Active Directory application and obtain credentials

Navigate to the Microsoft Azure Portal (portal.azure.com) and access Azure Active Directory > App registrations. Click 'New registration' and provide a name like 'ServiceNow Teams Integration' with supported account types set to 'Accounts in this organizational tenant only'. After registration, copy the Application (client) ID and Directory (tenant) ID from the Overview page. Navigate to Certificates & secrets, create a new client secret with appropriate expiration, and immediately copy the secret value as it will not be displayed again. Assign Microsoft Graph API permissions including ChannelMessage.Send, Chat.Create, and User.Read.All with admin consent granted.

2

Install Microsoft Teams spoke from ServiceNow Store

Navigate to System Applications > All Available Applications > All in ServiceNow and search for 'Microsoft Teams Spoke'. Click the Microsoft Teams spoke by ServiceNow and select 'Install' to add it to your Integration Hub spokes library. After installation completes, navigate to Integration Hub > Connections & Credentials > Connection & Credential Aliases to verify the Microsoft Teams connection alias template is available. The spoke installation includes pre-configured actions like 'Send Message to Channel', 'Send Adaptive Card', and 'Create Channel' that will be used in Flow Designer workflows. Verify the spoke appears in Flow Designer by navigating to Integration Hub > Flow Designer and checking the available actions under Microsoft Teams category.

3

Create Connection & Credential Alias for Microsoft Graph API

Navigate to Integration Hub > Connections & Credentials > Connection & Credential Aliases and click 'New'. Set the name to 'Microsoft Teams Production', select connection type as 'Use Connection resource', and create a new HTTP(S) connection with base URL 'https://graph.microsoft.com/v1.0'. For the credential, select 'OAuth 2.0' type and configure OAuth URL as 'https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token' replacing {tenant-id} with your actual tenant ID. Enter the client ID and client secret obtained from Azure AD registration, set scope to 'https://graph.microsoft.com/.default', and test the connection to ensure successful authentication. Common issues at this step include incorrect tenant ID format or insufficient API permissions in the Azure AD application.

4

Install and configure ServiceNow for Microsoft Teams app

In Microsoft Teams, navigate to Apps and search for 'ServiceNow' in the Microsoft Teams App Store, then install the official ServiceNow for Microsoft Teams app. After installation, add the app to relevant Teams channels where ServiceNow notifications should appear by typing '@ServiceNow' and following the configuration prompts. Configure the app by providing your ServiceNow instance URL and authenticating with ServiceNow credentials that have sufficient privileges to access the records you want to display in Teams. The app supports both personal use for individual notifications and team use for shared channel notifications, and you can configure multiple ServiceNow instances if your organization has development and production environments.

5

Create Flow Designer workflow for incident notifications

Navigate to Integration Hub > Flow Designer and create a new flow named 'Teams Incident Notification' with trigger 'Record Updated' on the Incident table. Add a condition to filter for incidents where state changes to 'High' or 'Critical' priority, ensuring notifications are sent only for important incidents. Add the Microsoft Teams spoke action 'Send Message to Channel' and configure it using the Connection & Credential Alias created earlier. Set the Teams channel ID (obtained from Teams channel settings) and compose a message template that includes incident number, short description, priority, and a direct link back to the ServiceNow incident record. Test the flow by updating a test incident's priority and verifying the message appears in the configured Teams channel.

ServiceNow Script
// Flow Designer condition script for filtering high priority incidents
(function execute(inputs, outputs) {
    var incident = new GlideRecord('incident');
    if (incident.get(inputs.sys_id)) {
        var currentPriority = incident.getValue('priority');
        var previousPriority = incident.getValue('priority').previous();
        // Send notification if priority changed to 1 (Critical) or 2 (High)
        outputs.sendNotification = (currentPriority == '1' || currentPriority == '2') && currentPriority != previousPriority;
    }
})(inputs, outputs);
6

Configure adaptive card approval workflow for change requests

Create a new Flow Designer workflow named 'Teams Change Approval' triggered when a change request enters 'Pending Approval' state. Use the Microsoft Teams 'Send Adaptive Card' action to send an interactive approval card to the change manager's Teams chat or designated approval channel. The adaptive card should display change details including planned start date, business justification, and risk assessment with 'Approve' and 'Reject' action buttons. Configure the card's submit action to call a ServiceNow Scripted REST API endpoint that will update the change request approval state based on the response. Include error handling in the flow to manage scenarios where the adaptive card fails to send or the recipient doesn't respond within the SLA timeframe.

ServiceNow Script
// Scripted REST API to handle adaptive card responses
(function process(request, response) {
    var requestBody = JSON.parse(request.body.dataString);
    var changeId = requestBody.changeId;
    var action = requestBody.action;
    var approver = requestBody.approver;
    
    var change = new GlideRecord('change_request');
    if (change.get(changeId)) {
        if (action === 'approve') {
            change.setValue('approval', 'approved');
            change.setValue('approved_by', approver);
        } else {
            change.setValue('approval', 'rejected');
            change.setValue('rejected_by', approver);
        }
        change.update();
        response.setStatus(200);
        response.getStreamWriter().writeString(JSON.stringify({status: 'success', message: 'Change request updated'}));
    }
})(request, response);
7

Set up proactive incident notifications with @mentions

Create an advanced Flow Designer workflow that not only sends Teams messages but also @mentions specific team members based on incident assignment group or affected service. Configure the workflow to query the Assignment Group table and extract Teams user IDs from ServiceNow user records that have Teams integration enabled. Use the Microsoft Graph API to resolve ServiceNow user email addresses to Teams user IDs, then format the message with proper @mention syntax to ensure critical incidents get immediate attention. Implement logic to escalate @mentions to management if the assigned technician doesn't acknowledge the incident within a specified timeframe, creating a comprehensive notification and escalation system.

ServiceNow Script
// Script to resolve ServiceNow users to Teams mentions
(function execute(inputs, outputs) {
    var assignedTo = inputs.assigned_to;
    var user = new GlideRecord('sys_user');
    if (user.get(assignedTo)) {
        var userEmail = user.getValue('email');
        // Call Microsoft Graph API to get Teams user ID
        var rm = new sn_ws.RESTMessageV2('Microsoft Graph Get User', 'GET');
        rm.getEndpoint().setConnectionAndCredentialAlias('Microsoft Teams Production');
        rm.setStringParameterNoEscape('user_email', userEmail);
        var response = rm.execute();
        if (response.getStatusCode() == 200) {
            var userInfo = JSON.parse(response.getBody());
            outputs.teams_mention = '<at id="' + userInfo.id + '">' + userInfo.displayName + '</at>';
        }
    }
})(inputs, outputs);
8

Test and validate integration with comprehensive scenarios

Create comprehensive test scenarios covering incident notifications, change approvals, and user @mentions to validate the complete integration functionality. Start by creating a test incident with high priority and verify the Teams notification appears with correct formatting and clickable ServiceNow links. Test the approval workflow by submitting a test change request and ensuring the adaptive card displays properly with functional approve/reject buttons that update the ServiceNow record. Verify @mention functionality by assigning incidents to different users and confirming they receive personalized notifications in Teams. Document any latency issues, authentication failures, or message formatting problems for troubleshooting, and establish monitoring procedures to track integration health through ServiceNow's Integration Hub execution details.

ServiceNow Script
// Test script to validate Teams integration
(function testTeamsIntegration() {
    // Create test incident
    var incident = new GlideRecord('incident');
    incident.initialize();
    incident.setValue('short_description', 'Teams Integration Test Incident');
    incident.setValue('priority', '1');
    incident.setValue('state', '1');
    incident.setValue('assignment_group', 'service_desk');
    var incidentId = incident.insert();
    
    gs.info('Created test incident: ' + incidentId);
    
    // Trigger the flow by updating priority
    incident.setValue('priority', '1');
    incident.update();
    
    return 'Test incident created and updated to trigger Teams notification';
})();

Common Use Cases

Critical Incident Alert Broadcasting

Automatically notify IT support channels in Teams when Priority 1 incidents are created or escalated in ServiceNow. The integration sends formatted messages including incident details, affected services, and direct links to the ServiceNow record, enabling rapid response coordination. Support managers receive @mentions for incidents affecting business-critical services, ensuring immediate visibility and faster resolution times. This use case typically reduces incident response time by 40-60% by eliminating the need for manual communication and email notifications.

Change Advisory Board Approvals

Streamline Change Advisory Board (CAB) approval processes by sending interactive adaptive cards to CAB members' Teams channels when emergency or standard changes require approval. The adaptive cards display change details, risk assessments, implementation timelines, and provide one-click approve/reject functionality that automatically updates ServiceNow records. This eliminates the need for separate approval emails and provides real-time visibility into approval status for change coordinators. Organizations typically see approval cycle times reduced from days to hours using this automated workflow.

Service Desk Queue Monitoring

Provide real-time visibility into service desk queue metrics by sending periodic status updates to Teams channels showing unassigned ticket counts, SLA breaches, and workload distribution across support agents. The integration can trigger alerts when queue thresholds are exceeded or when high-priority tickets remain unassigned beyond defined timeframes. Team leads receive actionable intelligence to balance workloads and prevent SLA violations, while agents stay informed about overall team performance. This proactive monitoring approach typically improves first-call resolution rates and customer satisfaction scores.

Problem Management Collaboration

Facilitate cross-functional collaboration during problem investigation by automatically creating dedicated Teams channels for major problems and inviting subject matter experts based on affected configuration items or services. The integration shares problem updates, related incident links, and investigation progress in the dedicated channel, maintaining a complete collaboration record. When problems are resolved, the solution details are automatically shared with relevant Teams, creating a knowledge base accessible through Teams search. This collaborative approach reduces problem resolution time and improves knowledge retention across IT teams.

Asset Management Notifications

Keep IT asset managers informed about critical asset lifecycle events such as warranty expirations, compliance violations, or unauthorized software installations detected by ServiceNow Discovery. Teams notifications include asset details, compliance status, and recommended actions with direct links to ServiceNow asset records for immediate remediation. Asset owners receive personalized notifications about their assigned equipment, enabling proactive maintenance and renewal planning. This automation helps organizations maintain compliance, reduce security risks, and optimize asset utilization rates.

Troubleshooting

Teams messages fail to send with 401 Unauthorized error in Integration Hub execution logs

This indicates an authentication failure with Microsoft Graph API, typically due to expired client secrets or insufficient API permissions. Navigate to Integration Hub > Connections & Credentials and test your Microsoft Teams connection alias to verify connectivity. Check the Microsoft Azure portal for your registered application and ensure the client secret hasn't expired, creating a new secret if necessary. Verify that required Microsoft Graph permissions (ChannelMessage.Send, Chat.Create, User.Read.All) are granted with admin consent, as missing permissions will cause authentication failures even with valid credentials.

Adaptive cards display in Teams but clicking approve/reject buttons produces no response or error

This typically occurs when the adaptive card's submit action URL is incorrect or the target Scripted REST API endpoint is misconfigured. Verify that the adaptive card JSON includes the correct ServiceNow instance URL in the submit action and that the endpoint is publicly accessible. Check the Scripted REST API configuration in ServiceNow to ensure it's active, has the correct resource path, and includes proper error handling for malformed requests. Test the API endpoint directly using a REST client to verify it accepts POST requests and returns appropriate HTTP status codes.

Flow Designer workflows trigger but Teams messages appear significantly delayed or inconsistent

Message delays usually result from Microsoft Graph API rate limiting or Integration Hub execution queue bottlenecks during peak usage periods. Review Integration Hub execution details to identify if requests are being throttled, and implement retry logic with exponential backoff in your flows. Consider using Microsoft Teams batch endpoints for multiple notifications to reduce API call volume and improve performance. If delays persist, check ServiceNow system performance metrics and consider scheduling non-urgent notifications during off-peak hours to reduce queue congestion.

ServiceNow users cannot be resolved to Teams @mentions, resulting in generic notifications

This occurs when ServiceNow user email addresses don't match Microsoft 365 user accounts or when Azure AD user lookup permissions are insufficient. Verify that ServiceNow user records contain accurate email addresses that correspond to active Microsoft 365 accounts in your tenant. Ensure your Azure AD application registration includes User.Read.All permission with admin consent granted, enabling Microsoft Graph API queries for user resolution. Implement error handling in your Flow Designer scripts to gracefully handle cases where users cannot be resolved, falling back to generic notifications rather than failing completely.

Teams channel IDs change unexpectedly, causing notification delivery failures

Teams channel IDs can change when channels are renamed, archived, or when the underlying Office 365 group structure is modified by administrators. Implement dynamic channel resolution by storing channel names rather than IDs and using Microsoft Graph API to resolve channel IDs at runtime. Create a ServiceNow table to maintain mappings between ServiceNow assignment groups and Teams channels, with periodic validation jobs to verify channel accessibility. Consider using Teams webhooks as an alternative for simple notifications, as webhook URLs remain stable even when channel metadata changes.

Integration Hub flows fail with 'Connection timeout' errors when calling Microsoft Graph API

Connection timeouts typically indicate network connectivity issues between ServiceNow and Microsoft Graph endpoints, often caused by corporate firewall restrictions or DNS resolution problems. Verify that your ServiceNow instance can reach graph.microsoft.com on port 443 by testing connectivity from the ServiceNow instance's network. If using a MID Server for outbound connections, ensure it has proper internet access and isn't blocked by corporate proxy servers. Check ServiceNow system logs for DNS resolution errors and work with network administrators to whitelist Microsoft Graph API endpoints in your organization's firewall and proxy configurations.

Pro Tips

  • Implement message throttling in your Flow Designer workflows using custom script steps that track message frequency per channel and introduce delays during high-volume periods. This prevents overwhelming Teams channels during major incidents and helps you stay within Microsoft Graph API rate limits while maintaining user experience. Consider using ServiceNow's sys_trigger table to queue and batch notifications during peak periods.
  • Create reusable subflows in Flow Designer for common Teams operations like user resolution, message formatting, and error handling to maintain consistency across all your Teams integrations. These subflows can include advanced features like message templating, conditional @mentions based on time of day, and automatic fallback to email notifications when Teams delivery fails. This modular approach significantly reduces development time for new use cases.
  • Leverage Teams' threaded conversation features by storing conversation IDs in ServiceNow records, enabling follow-up messages to appear as replies rather than separate notifications. This creates a more organized communication flow and helps users track related updates without channel flooding. Implement this by adding custom fields to your ServiceNow tables to store Teams message and conversation metadata.
  • Configure monitoring dashboards using ServiceNow Performance Analytics to track Teams integration health, including message delivery rates, API response times, and user engagement metrics with adaptive cards. Set up automated alerts when integration performance degrades or when approval response rates drop below acceptable thresholds. This proactive monitoring approach helps identify issues before they impact business operations.
  • Design your adaptive cards with progressive disclosure principles, showing essential information immediately while providing expansion options for detailed data that might overwhelm the initial view. Use Teams' card refresh capabilities to update approval cards with current information when the underlying ServiceNow records change, ensuring decision-makers always have the latest data. Include card versioning to handle scenarios where multiple approvers might see different card states.
  • Implement intelligent message routing based on ServiceNow data relationships, automatically determining the most appropriate Teams channel or user based on configuration item relationships, assignment group hierarchies, and business service mappings. This dynamic routing ensures notifications reach the right people without manual configuration, reducing maintenance overhead as your organization structure evolves.

Known Limitations

  • Microsoft Graph API enforces strict rate limiting with a baseline of 10,000 requests per 10 minutes per application, which can be restrictive for large ServiceNow instances with high incident volumes or frequent status updates. Organizations may need to implement message batching, caching strategies, or request queuing mechanisms to avoid hitting rate limits during peak usage periods. The actual rate limits can vary based on Microsoft 365 license types and tenant-specific throttling policies.
  • Adaptive cards in Teams have formatting and interactivity limitations compared to full web interfaces, restricting complex approval workflows or detailed data visualization within the Teams environment. Cards cannot embed rich media, support complex input validation, or maintain persistent state across interactions, requiring users to navigate to ServiceNow for advanced operations. Additionally, adaptive card schema updates may require redeployment of Integration Hub flows to maintain compatibility.
  • The integration requires users to maintain active sessions in both ServiceNow and Microsoft Teams for optimal functionality, and authentication tokens can expire unpredictably based on organizational security policies. Guest users and external collaborators may have limited access to ServiceNow-originated content in Teams, potentially excluding important stakeholders from critical communications. Cross-tenant scenarios in large organizations can introduce additional authentication complexity and feature limitations.

Frequently Asked Questions

Can the ServiceNow Teams integration work with Microsoft Teams Government or GCC High environments?

Yes, but it requires specific configuration changes to use the appropriate Microsoft Graph endpoints for government clouds (graph.microsoft.us for GCC High). You'll need to modify the Connection & Credential Alias to point to the correct Graph API endpoints and ensure your Azure AD application is registered in the government tenant rather than commercial Azure AD. The ServiceNow for Microsoft Teams app may have limited availability in government environments, so verify app store access with your Microsoft administrator before implementation.

How can I customize the appearance and branding of ServiceNow notifications in Teams channels?

Teams message formatting supports Markdown and limited HTML styling, allowing you to customize colors, fonts, and layouts within Teams' constraints. For adaptive cards, you can modify the JSON schema in Flow Designer to include custom styling, hero images, and branded color schemes that align with your organization's visual identity. However, extensive customization may require developing a custom Teams application rather than using the standard ServiceNow spoke, which provides more control over branding but increases development complexity significantly.

What happens to Teams notifications when ServiceNow undergoes maintenance or experiences downtime?

During ServiceNow downtime, new notifications will not be generated, but Integration Hub includes built-in retry mechanisms that will attempt to deliver queued messages once connectivity is restored. Messages queued during extended outages may experience delays or could be dropped if retry limits are exceeded, so consider implementing alternative notification channels for critical incidents. You can configure Flow Designer workflows with error handling to log failed notifications for manual review and reprocessing after system recovery.

Can I integrate ServiceNow with Microsoft Teams without using Integration Hub Professional license?

Limited integration is possible using custom scripts with RESTMessageV2 or GlideHTTPRequest to call Microsoft Graph APIs directly, but this approach lacks the pre-built actions, error handling, and visual workflow design that Integration Hub provides. You'll need to develop custom authentication handling, retry logic, and message formatting manually, significantly increasing development time and maintenance complexity. The ServiceNow for Microsoft Teams app from the Teams App Store provides basic functionality for viewing ServiceNow records but doesn't support automated workflows without Integration Hub.

How do I handle Teams notifications for ServiceNow records that contain sensitive or confidential information?

Implement data filtering in your Flow Designer workflows using conditional logic to exclude sensitive fields from Teams messages, sending only essential information like ticket numbers and generic status updates. For records requiring full details, send Teams notifications with links back to ServiceNow where proper access controls and audit trails are maintained. Consider creating separate Teams channels with restricted membership for sensitive notifications, and leverage ServiceNow's Advanced Work Assignment to ensure notifications only reach users with appropriate security clearances.

What's the best practice for managing Teams channel IDs when implementing notifications across multiple ServiceNow instances?

Create a dedicated ServiceNow table to store mappings between assignment groups, notification types, and Teams channel information, making it easy to manage channel configurations without modifying Flow Designer workflows. Use Connection & Credential Aliases with environment-specific naming conventions (e.g., 'Teams_PROD', 'Teams_DEV') to ensure proper routing across ServiceNow instances. Implement a validation script that periodically tests channel accessibility and updates administrators when channels become unavailable or require reconfiguration due to Teams organizational changes.

Can Teams adaptive card responses trigger complex ServiceNow workflows beyond simple approvals?

Yes, adaptive card responses can trigger comprehensive ServiceNow automation through Scripted REST APIs that initiate Flow Designer workflows, execute Business Rules, or call custom Script Includes with complex logic. Design your adaptive cards to pass sufficient context data (record IDs, user information, selected options) to ServiceNow endpoints that can perform multi-step processes like automated testing, resource provisioning, or cascading approvals. However, keep in mind that adaptive cards cannot display real-time progress updates, so complex workflows should provide status updates through separate Teams notifications or direct users to ServiceNow for detailed progress tracking.

Test Your Knowledge

Quick 3-question quiz — see how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue