# Microsoft 365

Unlock the full potential of your Microsoft 365 suite with Torq. From email security automation in Outlook to real-time collaboration in Teams, Torq streamlines every part of your operations. With the Microsoft 365 integration, you can eliminate repetitive tasks, accelerate incident response, and unify your tools.

Built-in support for Microsoft Graph and Defender APIs lets you connect security and productivity like never before. Whether you're scaling your SecOps processes or improving IT security, Torq brings speed, consistency, and reliability to every Microsoft 365 interaction.

Torq enables quick and easy integration with Microsoft 365, so you can automate anything and everything within moments. Torq's public Microsoft 365 Steps include:

**## Microsoft 365 Products**

Microsoft Outlook:

- Copy Message

- Delete Message

- Get Attachments

- Create Basic Message Rule

- +35 more...

Microsoft Excel:

- Add Worksheet

- Delete Worksheet

- Create Table

- Add Rows

- +21 more...

Microsoft Lists:

- Create Column in List

- Create List

- Create List Item

- Delete List Item

- +7 more...

Microsoft OneDrive:

- Add Permissions

- Create New Folder

- Download Item

- List Groups

- +15 more...

Microsoft Intune:

- Get All Managed Devices

- List All Devices For Policy

- Reboot Device

- Get All Users

- +9 more...

Microsoft SharePoint:

- Get Group Site

- Get Site Resource

- List Substitutes for Site

- Search Site

- Upload File to SharePoint Drive

And many, many more.

If you don't see a Step you need, you can [create your own](https://kb.torq.io/en/articles/9183207-creating-custom-steps-in-torq-automate-anything) in various ways, such as using the Send an HTTP Request Step or Torq’s Step Builder, and share it across your organization.

To [trigger](https://kb.torq.io/en/articles/9130865-integration-triggers-in-torq-ingest-data) a Torq Workflow based on events sent from Microsoft 365 (using the Graph Trigger integration), look [here](https://kb.torq.io/en/articles/9380201-microsoft-365-graph-subscription).
​

To use Microsoft 365 [Steps](https://kb.torq.io/en/articles/9122841-explore-torq-steps-workflow-building-blocks) in Torq Workflows, look [here](#h_d3a50e0004). Also see our **[Microsoft Permissions document](https://kb.torq.io/en/articles/10305275-microsoft-recommended-permissions)** for permissions information.

# **Use Microsoft 365 Steps in Torq**

## **Step One: Create a Microsoft 365 Application**

1. **Open Microsoft Azure:** Go to your [Azure portal](https://portal.azure.com/?bundlingKind=DefaultPartitioner&configHash=PkNJfkTTGDC1&env=portal&l=en.en-us&pageVersion=14.232.2.114.232.0.192030.241204-1800#home) and click **Microsoft Entra ID.**

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1644890731/15a28ca3d43a0042aa44193bb62f/Screenshot+2025-07-30+at+10_47_25+copy.png?expires=1793573100&amp;signature=fbb05ce7910c22e6f033f46460026e184f723c96acdf7af9bc1887856705748d&amp;req=dSYjEsF3nYZcWPMW1HO4zXbGkPYG4hNl6uh233zpvw9gaynET8DaXsazjn8j%0Amxi5%0A)

2. **Register a new application:** Go to **Manage > App registrations** and click **New registration**.

  1. Enter a unique and meaningful name.

  2. Give the account `Accounts in this organization directory only` access.

  3. Click **Register**.

3. **Grant permissions:** Select the new application and go to **Manage > API permissions**. This will grant the permissions here for Torq Steps.

  1. Click **Add a permission** and select **Microsoft Graph**.

  2. Click **Application permissions.**

    ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1301682778/dfe02c9642d4f5a4de59f29b844c/image.png?expires=1793573100&amp;signature=68ff72977d7f03e61443f546d1b72da97ad902734baafc960ed46d4a4dca72b8&amp;req=dSMnF892n4ZYUfMW1HO4zSZZ0xdzKSYi8iQJIxT6HiZUZy0gqYn97QdcEXl5%0AtLIS%0A)

  3. See our extensive [Microsoft Permissions document](https://kb.torq.io/en/articles/10305275-microsoft-recommended-permissions) for details. The permissions you enable depend on your integration's purpose—Outlook, OneDrive, and general Microsoft 365 Steps each require different permissions. While some overlap exists, it's best to enable only the permissions needed for each integration and application.

  4. The Microsoft 365 integration is for application-level  permissions. For delegated access permissions, see the [Microsoft 365 Delegated Access](https://kb.torq.io/en/articles/10287213-microsoft-365) integration.

4. **Grant consent:** Click **Grant admin consent for `<your org name`>.**

5. **Copy** **info:** From the **Overview** page of your application, copy the **Application (client) ID** and **Directory (tenant) ID** to save it for later.

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1301684142/79c5220047a0bfcdcd2b3d254130/image.png?expires=1793573100&amp;signature=5e5546a07f5c1dd4e45878423d94599f5a1b15f70234899034df8e243394e944&amp;req=dSMnF892mYBbW%2FMW1HO4zZcJ7KA1thGb0soqS%2F8g5FFe1iDxqushxSG4SbWa%0A6dXh%0A)

6. **Client secret:** In your application, go to **Certificates & secrets** and click **New Client Secret.**

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1301681721/7d3c0a3cac91dbdf74d0d0f23c84/image.png?expires=1793573100&amp;signature=6a8c102105d86549502e92fc873b9368eeb9659404cfeedb02efa4d903246fe4&amp;req=dSMnF892nIZdWPMW1HO4zes%2BM4VsHY2xzhBPhaaBlOk%2BMcUNNoAQGUqNCnPN%0Avaif%0A)
  1. Give the secret an accurate description.

  2. Set the expiration date. It is recommended that you use a custom date in the extended future (but in compliance with your organization's policies).

  3. Click **Add**.

7. Copy the generated secret.

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1301909536/9296740fed9940d8ab5f896b0b96/image.png?expires=1793573100&amp;signature=2f2127abb773e8ffc4db90ee1540f2acd69d9d14f4e2c744e9e9e419821065ee&amp;req=dSMnF8B%2BlIRcX%2FMW1HO4zXy%2BOjutyu%2BRonnCxb0V0BzVJ8jQrHCREiEGB080%0Ag0FK%0A)

To limit permissions to specific user or shared mailboxes, see the [Microsoft guide](https://learn.microsoft.com/en-us/exchange/permissions-exo/application-rbac) on assigning policies to service accounts.

## **Step Two: Create a Microsoft 365 Steps Integration in Torq**

1. **Navigate to integration:** Go to **Build > Integrations > Steps > Microsoft 365** and click **Add**.

2. **Fill in the details**: Follow the following steps to fill in the information.

  1. Give the integration a unique and meaningful name.

  2. Paste the Tenant ID you retrieved [earlier](#h_425890f73b).

  3. Paste the Client ID you retrieved earlier.

  4. Paste the Client Secret you retrieved earlier.

3. **Finalize**: Click **Add** to save.

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1301686781/d4e9114e3f51412e1d99e7719141/image.png?expires=1793573100&amp;signature=3cf3993064a358cc7509f95907b5cbc06df63e5997e7a40ce0177887df13aefa&amp;req=dSMnF892m4ZXWPMW1HO4zT2P02qMaVpd%2Fx5x60AqErVnCmn4p7o3BQN%2FYF4r%0AtcKz%0A)

## Step Three: Use the Integration in Torq Steps

- To use Microsoft 365 steps in Torq, you must first add the Microsoft 365 step **Generate Access Token**.

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1304339978/4a19c5b77eae266ef5b6148576e3/image.png?expires=1793573100&amp;signature=2290316efa8936694daee714345ee770cc6bde6a4f6b3eed53d12c6ed77515b6&amp;req=dSMnEsp9lIhYUfMW1HO4zbxBroToFCRlz3ARy2dAN7ArG4dO1oUbuzHL40%2Bd%0ARmUK%0A)

- Then, reference the generated access token in the following steps as `{{$.generate_access_token.api_object.access_token}}`.

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1304341082/4423a03dda998e672059c7badef6/image.png?expires=1793573100&amp;signature=d8ec59a8540e33bc827b0c321cbe0b29acaa6769439fef6e5394fc8f68fc0e10&amp;req=dSMnEsp6nIFXW%2FMW1HO4zS3xeYGLgFzg8PV6ck9FN8ItHN6FCGTW6BUI%2Bl3Z%0AHLeP%0A)

---

# **FAQs**

- [Send Emails with Inline Images in Microsoft Outlook](https://kb.torq.io/en/articles/9297456-send-emails-with-inline-images-in-microsoft-outlook)

- [Trigger a Workflow in Torq when Files in Microsoft OneDrive Folder are Changed](https://kb.torq.io/en/articles/9828706-trigger-a-workflow-in-torq-when-files-in-microsoft-onedrive-folder-are-changed)

- [Send and Refresh Adaptive Card in Outlook Email](https://kb.torq.io/en/articles/9024679-send-and-refresh-adaptive-card-in-outlook-email)

- [Setup Delegated Access to a Microsoft Application using OAuth2](https://kb.torq.io/en/articles/9024678-setup-delegated-access-to-a-microsoft-application-using-oauth2)

---

# **Templates**

Now that you've added the step integration check out these specially crafted templates by Torq's security experts. Visit Torq's template library for [more](https://app.torq.io/templates?).

- [Send a Microsoft Outlook Email to Assignee in a Torq Case](https://app.torq.io/templates?id=f656ebe4-fb3c-408f-a3d3-f4fb5e15c89f)

- [Interactive Email Conversation (Microsoft 365)](https://app.torq.io/templates?id=af00a513-29a7-41a7-b0a1-972babdf3de2)

- [Monitor an Outlook Mailbox for Phishing via Graph Subscription](https://app.torq.io/templates?id=aff69b2f-c262-4c95-800a-9979cf17ad3f)

​