---
sourceDocument: Xanadu Create Integrations with Applications
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/integrate-applications

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu Create Integrations with Applications

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# Set up a bi-directional webhook for the Microsoft Teams Graph spoke

# Set up a bi-directional webhook for the Microsoft Teams Graph spoke {#ariaid-title1}

* Release version: Xanadu
* 
* Updated September 6, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Configure a webhook to subscribe to Microsoft Teams with a ServiceNow callback URL.

## Before you begin

* Request the required IntegrationHub subscription
* Activate the Microsoft Teams Graph spoke
* Role required: admin
{#setup-webhook-ms-teams-graph__ul_i3q_pk2_4qb}

## Register a Microsoft Teams Graph webhook in ServiceNow instance {#ariaid-title2}

Register Microsoft Teams in your ServiceNow instance to notify the ServiceNow app when certain events occur in Microsoft Teams.

### Before you begin

Role required: admin

### Procedure

1. Navigate to Microsoft Teams Graph SpokeWebhook Registry.
2. Click New.
3. On the form, fill in these fields:  
   {#register-ms-teams-graph-webhook__table_ec5_kn2_4qb__entry__2}

   |   |   |
   |-|-|
   | Name | Name to identify the webhook registry. For example, <kbd class="ph userinput">MS Teams Graph webhook registry</kbd>. |
   | Client State | Client State |
   | Path | Microsoft Teams Graph webhook path. This field is auto-populated to <kbd class="ph userinput">api/sn_msteams_ahv2/ms_teams_webhook</kbd>. |
   | Description | Description of the webhook registry. |
   [ ]

   {#register-ms-teams-graph-webhook__table_ec5_kn2_4qb}
4. Right-click the form header and click Save.
5. Click Callback URL.  
   The system auto-populates the webhook callback URL.

## Create webhook subscription for a channel {#ariaid-title3}

Create a webhook subscription for the required channel in a team by testing the Subscribe Webhook subflow.

### Before you begin

Role required: admin

### Procedure

1. Navigate to Process AutomationWorkflow Studio.
2. Click Subflows.
3. Open the Subscribe Webhook subflow.
4. Click Test.
5. On the form, fill in these values.  
   {#ms-teams-subscribe__table_fyq_s1s_pcc__entry__2}

   | Field | Description |
   |-|-|
   | Webhook Registry Record Name | Name of the webhook record you had provided when you [registered the webhook in ServiceNow instance](https://www.servicenow.com/docs/zVSDDEIMlriUQLmGUHEPgQ#register-ms-teams-graph-webhook "Register Microsoft Teams in your ServiceNow instance to notify the ServiceNow app when certain events occur in Microsoft Teams."). For example, <kbd class="ph userinput">MS Teams Graph webhook registry</kbd>. |
   | Change Type | Type of change in the subscribed resource that should send a change notification. The supported values are: <kbd class="ph userinput">created</kbd>, <kbd class="ph userinput">updated</kbd>, and <kbd class="ph userinput">deleted</kbd>. You can provide multiple comma-separated values. |
   | Team ID | Unique identifier of the team. |
   | Channel ID | Unique identifier of the channel. |
   [ ]

   {#ms-teams-subscribe__table_fyq_s1s_pcc} Figure 1. Test the Subscribe Webhook subflow
6. Click Run Test.  
   Subscription for the required channel is created.

   See [Building subflows](https://www.servicenow.com/docs/access?context=subflows&version=xanadu&pubname=xanadu-build-workflows&ft:locale=en-US) for more information about testing subflows.

## Customize a spoke subflow {#ariaid-title4}

Customize the required subflow that is shipped along with the spoke by creating a copy of it.

### Before you begin

Role required: admin

### Procedure

1. Navigate to Process AutomationWorkflow Studio.
2. Click Subflows.
3. Open the required subflow that is shipped along with the Microsoft Teams Graph spoke.  
   For example, Process Inbound Notifications subflow.
4. Click the more actions icon (![More actions menu]()) and select Copy subflow.
5. In New flow name, enter a unique name you want the copied subflow to have.  
   For example, Copy of Process Inbound Notifications subflow.
6. Click Copy.  
   A copy of the subflow is created.
7. Customize the subflow according to your requirement and publish it.  
   See [Building subflows](https://www.servicenow.com/docs/access?context=subflows&version=xanadu&pubname=xanadu-build-workflows&ft:locale=en-US) for more information about creating and using subflows.

## Configure Microsoft Teams Graph webhook decision policy {#ariaid-title5}

Create webhook routing policy and subflow according to your requirements.

### Before you begin

Role required: admin

### Procedure

1. Navigate to Microsoft Teams Graph SpokeWebhook Decision Policy
2. Click New.
3. On the form, fill in the fields.  
   {#config-teams-graph-webhook-decision-policy__table_ht1_kr2_4qb__entry__2}

   | Field | Description |
   |-|-|
   | Label | Unique label to identify the routing policy. |
   | Answer | Subflow that should be triggered when the conditions are met. 1. Click the Lookup icon. 2. Select the required subflow from the Document: list. For example, Copy of Process Inbound Notifications. {#config-teams-graph-webhook-decision-policy__ol_ywr_qr2_4qb} |
   | Default Answer | Option to specify if this answer is the default answer. Default answer is applicable when the conditions are not met. |
   | Condition | Conditions to be met when the incoming webhook delivers data from Microsoft Teams. |
   [Table 1. Decision form]

   {#config-teams-graph-webhook-decision-policy__table_ht1_kr2_4qb}
4. Click Submit.  
   Note:  
   These routing policies are saved in the Decision tables. Users are cautioned against directly updating or modifying data in these tables.
{#config-teams-graph-webhook-decision-policy__steps_vdt_bvs_pcc}

*[\>]: and then


