> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List New Messages

Lists all messages in user's mailbox. The value `me` can not be used in the `User ID parameter`.

* **Least privileged** Microsoft Graph permission to access the action via **application**: `Mail.ReadWrite`.

```
Note: Using the delegated (OAuth) connection type will only allow to insert the connected user's ID.
```

<Note>
  External Documentation

  To learn more, visit the [Microsoft Outlook documentation](https://learn.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0\&tabs=http).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter                      | Description                                                                                                                                                                                                                                |
  | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Filter                         | Specify an OData `$filter` query option to refine the retrieved messages.<br /><br />Example: `from/emailAddress/address eq 'someuser@example.com'`<br /><br />**Note**: To filter by time, please **only** use the `From Date` parameter. |
  | From Date                      | Date from which to show all new messages.                                                                                                                                                                                                  |
  | Limit                          | Set the page size of the returned results.                                                                                                                                                                                                 |
  | Order By                       | Order the results by one or more properties and their correlating directions.<br /><br />Example: `receivedDateTime desc`                                                                                                                  |
  | Return All Pages               | Automatically fetch all resources, page by page.                                                                                                                                                                                           |
  | User ID or User Principal Name | The ID or userPrincipalName of the user.                                                                                                                                                                                                   |
</div>

## Example Output

```json theme={"dark"}
{
	"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('bb8775a4-4d8c-42cf-a1d4-4d58c2bb668f')/messages(sender,subject)",
	"value": [
		{
			"@odata.etag": "W/\"CQAAABYAAADHcgC8Hl9tRZ/hc1wEUs1TAAAwR4Hg\"",
			"id": "AAMkAGUAAAwTW09AAA=",
			"subject": "You have late tasks!",
			"sender": {
				"emailAddress": {
					"name": "Microsoft Planner",
					"address": "noreply@Planner.Office365.com"
				}
			}
		}
	],
	"@odata.nextLink": "<string>"
}
```

## Workflow Library Example

[List New Messages with Microsoft Outlook and Send Results Via Email](https://library.blinkops.com/workflows/list-new-messages-with-microsoft-outlook-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-new-messages-with-microsoft-outlook-and-send-results-via-email/canvas" />
</div>
