Microsoft 365 (signed-in user) (Apps step)
Microsoft 365 (signed-in user)
Posts Teams channel messages, reads and adds rows in Excel tables, and lists OneDrive files through Microsoft Graph, signed in as one person: messages and rows are made as the person who clicked Connect, and the step sees only what that person may see.
Use it for Microsoft 365 work that must be done as a person rather than as an app: post to a Teams channel, add rows to an Excel table someone keeps, or pick up files from that person's OneDrive. For SharePoint files, lists and mail as an app, use the Microsoft 365 step.
Beta. This step has not yet been checked against a live Microsoft 365 (signed-in user) account, so treat its first runs as a test, and tell us if an operation does not answer as described.
Find it in the workflow editor's palette under Apps. See Apps steps for what every Apps step has in common.
Set it up
- In the Microsoft Entra admin center, open App registrations › New registration, register an app for this organization only, and note its Application (client) ID.
- Under Authentication › Add a platform › Web, add the Redirect URI the DataMagik OAuth 2.0 credential shows (add the credential first, copy the URI, then come back).
- Under API permissions › Add a permission › Microsoft Graph › Delegated permissions, add offline_access, User.Read, Files.ReadWrite.All, Sites.ReadWrite.All, Team.ReadBasic.All, Channel.ReadBasic.All and ChannelMessage.Send. If your organization asks for it, click Grant admin consent.
- Under Certificates & secrets › Client secrets, create a secret and copy its Value (it is shown once).
- Add graph.microsoft.com to Allowed Domains in the workflow's Script settings.
Credential: An OAuth 2.0 authorization code credential for a Microsoft Entra app: its Application (client) ID and a client secret. After saving it, a person clicks Connect and signs in; the step then acts as that person.
Signing in with OAuth 2.0
| Grant type | Sign in with the provider (authorization code). Save the credential, then click Connect on it. |
| Sign-in (authorization) URL | https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize |
| Token URL | https://login.microsoftonline.com/organizations/oauth2/v2.0/token |
| Scope | offline_access User.Read Files.ReadWrite.All Sites.ReadWrite.All Team.ReadBasic.All Channel.ReadBasic.All ChannelMessage.Send |
Register the Redirect URI the credential form shows in the provider's app settings.
Register the app in Microsoft Entra ID with the Web platform and the Redirect URI the credential shows, add the Microsoft Graph DELEGATED permissions in the scope (offline_access keeps the sign-in alive), and create a client secret. The person who clicks Connect is who every message and row is made as, so use a shared account such as a plant bot user rather than a person's own account where you can.
Hosts it calls: graph.microsoft.com
Operations
| Operation | What it does |
|---|---|
| Team › List | Lists the Teams teams the signed-in person belongs to. |
| Channel › List | Lists a team's channels that the signed-in person can see. |
| Channel › Post message | Posts a message in a Teams channel, as the signed-in person. |
| Excel › List rows | Lists the rows of a table in an Excel workbook stored in OneDrive or SharePoint. |
| Excel › Add rows | Adds rows to the end of a table in an Excel workbook, as the signed-in person. |
| My files › List | Lists the files and folders at the top of the signed-in person's OneDrive, following every page up to the step's page limit. |
Team › List
Lists the Teams teams the signed-in person belongs to.
Calls GET /me/joinedTeams.
What comes out: One item per team: {{ $json.id }} (what the Team field takes), {{ $json.displayName }} and {{ $json.description }}.
Example: Run it once to see the id of the Plant Operations team.
Channel › List
Lists a team's channels that the signed-in person can see.
Calls GET /teams/{teamId}/channels.
| Field | Required | What to put |
|---|---|---|
| Team | Yes | The team's id, a GUID; List teams gives it as {{ $json.id }}. For example 172b0cce-e65d-44ce-9a49-91d9f2e8493a. Choose from list beside the field fetches the choices from your account. |
What comes out: One item per channel: {{ $json.id }} (what the Channel field takes, such as 19:…@thread.tacv2), {{ $json.displayName }}, {{ $json.description }}, {{ $json.membershipType }} and {{ $json.webUrl }}.
Example: List the Plant Operations team's channels to find the Maintenance channel's id.
Channel › Post message
Posts a message in a Teams channel, as the signed-in person.
Calls POST /teams/{teamId}/channels/{channelId}/messages.
| Field | Required | What to put |
|---|---|---|
| Team | Yes | The team's id, a GUID; List teams gives it as {{ $json.id }}. For example 172b0cce-e65d-44ce-9a49-91d9f2e8493a. Choose from list beside the field fetches the choices from your account. |
| Channel | Yes | The channel's id, such as 19:…@thread.tacv2; List channels gives it as {{ $json.id }}. For example 19:4a95f7d8db4c4e7fae857bcebe0623e6@thread.tacv2. Choose from list beside the field fetches the choices from your account. |
| Message format | No | Whether the message is HTML (bold, links, line breaks with <br>) or plain text. One of: HTML, Plain text. |
| Message | Yes | The message's text, or its HTML when Message format is HTML. For example <b>Line {{ $json.line }} down</b> since {{ $json.since }}. |
What comes out: One item: the posted message, with {{ $json.id }}, {{ $json.createdDateTime }}, {{ $json.webUrl }} (a link to it in Teams) and {{ $json.from.user.displayName }} (the signed-in person).
Example: Post <b>Scrap alert</b>: {{ $json.part }} at {{ $json.rate }}% in the Quality channel when a Plex Data Source finds scrap over 2%.
Excel › List rows
Lists the rows of a table in an Excel workbook stored in OneDrive or SharePoint.
Calls GET /drives/{driveId}/items/{itemId}/workbook/tables/{table}/rows. Follows the pages, up to Most pages (10 unless you change it).
| Field | Required | What to put |
|---|---|---|
| Drive ID | Yes | The drive the workbook is in, starting b!; List my files gives it as {{ $json.parentReference.driveId }} (see the tips). For example b!AbCdEf…. |
| File ID | Yes | The workbook's file id; List my files gives it as {{ $json.id }}. For example 01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K. |
| Table | Yes | The Excel table's name (Table Design › Table Name in Excel), such as Table1 or Downtime. For example Table1. |
What comes out: One item per row: {{ $json.index }} (0 for the first row under the headers) and {{ $json.values }}, a list holding one list of the row's cell values in column order, so {{ $json.values[0][0] }} is the first column.
Example: List the Downtime table each morning and total {{ $json.values[0][2] }} (the minutes column) for the shift report.
Excel › Add rows
Adds rows to the end of a table in an Excel workbook, as the signed-in person.
Calls POST /drives/{driveId}/items/{itemId}/workbook/tables/{table}/rows.
| Field | Required | What to put |
|---|---|---|
| Drive ID | Yes | The drive the workbook is in, starting b!; List my files gives it as {{ $json.parentReference.driveId }} (see the tips). For example b!AbCdEf…. |
| File ID | Yes | The workbook's file id; List my files gives it as {{ $json.id }}. For example 01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K. |
| Table | Yes | The Excel table's name (Table Design › Table Name in Excel), such as Table1 or Downtime. For example Table1. |
| Rows | Yes | A JSON list of rows, each a list with one value per table column in order; give every column, using "" for an empty cell. For example [["{{ $json.date }}", "{{ $json.line }}", {{ $json.minutes }}]]. |
What comes out: One item: the added rows, with {{ $json.index }} (the first new row's position under the headers) and {{ $json.values }} as Excel stored them.
Example: Add [["{{ $json.date }}", "{{ $json.line }}", {{ $json.minutes }}, "{{ $json.reason }}"]] to the Downtime table for every stop the line reports.
My files › List
Lists the files and folders at the top of the signed-in person's OneDrive, following every page up to the step's page limit.
Calls GET /me/drive/root/children. Follows the pages, up to Most pages (10 unless you change it).
What comes out: One item per file or folder: {{ $json.id }} (what File ID takes), {{ $json.name }}, {{ $json.size }} (bytes), {{ $json.lastModifiedDateTime }}, {{ $json.webUrl }}, {{ $json.parentReference.driveId }} (what Drive ID takes), and {{ $json.file }} for a file or {{ $json.folder }} for a folder.
Example: List my files to find Downtime.xlsx's {{ $json.id }} and {{ $json.parentReference.driveId }} for the Excel operations.
Trigger: Microsoft 365 (signed-in user): New Items
Under Triggers in the palette. It looks at Microsoft 365 (signed-in user) on a schedule (every 15 minutes unless you change Look every) with one of these operations: Excel › List rows; My files › List, and starts the workflow with the items it has not seen on an earlier look, one item each. Saving the workflow sets up the schedule.
- New means: not seen before, by the item's id (or the field you name in Item field), or newer than the newest one last time, by a date or increasing number.
- On the first run it only remembers what is there, unless you choose Start with everything.
- Test runs show what would be new without remembering it. It remembers the last 5000 ids, so filter the list to keep it shorter than that.
Example
When a line goes down, Microsoft 365 (signed-in user) › Post to channel posts <b>Line {{ $json.line }} down</b> since {{ $json.since }} in the Maintenance channel, and Add rows logs the stop in the Downtime table of Downtime.xlsx.
Tips
- Everything is done as the person who clicked Connect: messages show their name, and the step can only reach the teams, files and workbooks they can. A shared bot account keeps posts from looking like one person's.
- Choose the Team and Channel from the lists; the Team list shows the teams the signed-in person belongs to.
- Excel operations need the workbook's drive id and file id: List my files gives {{ $json.id }} for a file in the person's OneDrive and {{ $json.parentReference.driveId }} for its drive. The table is the Excel table's name (Table Design › Table Name), such as Table1.
- Excel rows are a list of lists, one inner list per row with a value for every column in order: [["2026-11-22", "Line 3", 45]].
- If Connect stops working (the person left or changed their password), click Connect again on the credential.
Settings every Apps step has
- More query parameters: any query parameter the fields do not offer, sent as is.
- More body fields: a JSON object merged into the request body; nested objects merge, other values replace.
- Most requests per second: spaces the calls out for rate limits. A "too many requests" (429) answer is retried after the wait the API asks for.
- Most pages: for operations that follow pages, the most pages to fetch (10 unless you change it, up to 100). The run warns when it stops with more to get.
- Fail on a non-2xx response: on by default. Turn it off to handle errors yourself.
Microsoft 365 (signed-in user)'s own API documentation: https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0