# Enabling OAuth2 Authorization in your Microsoft Account - Grant Flow

## Microsoft Grant flow

### Setting permissions in Azure for Grant Flow <a href="#setting-permissions-in-azure-for-grant-flow" id="setting-permissions-in-azure-for-grant-flow"></a>

The following permissions are required for the Grant flow:

* Mail.ReadWrite
* Mail.Send
* User.Read.All

**Make sure to grant admin consent after adding permissions.**

![](https://docs.meta-inf.hu/email-this-issue/~gitbook/image?url=https%3A%2F%2F880912854-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Mf8H-oTE_fhOrUtfYrN-2724419853%252Fuploads%252FO5LOYBQlS8YtajcN38e3%252FMicrosoft-grant-API-permissions.jpeg%3Falt%3Dmedia%26token%3D861d080f-a0ac-4195-acd5-d7abc178f0a7\&width=768\&dpr=4\&quality=100\&sign=7e70b5\&sv=2)

### Credentials settings <a href="#credentials-settings" id="credentials-settings"></a>

The  shows a setting for OAuth2 Credentials in Email This Issue. The Auth Endpoint URL ending has to be changed to `/adminconsent` .

![](https://docs.meta-inf.hu/email-this-issue/~gitbook/image?url=https%3A%2F%2F880912854-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Mf8H-oTE_fhOrUtfYrN-2724419853%252Fuploads%252FcywDlfWIFyDNCd0MdLyq%252FMicrosoft-grant-oauth2-credentials-settings.jpeg%3Falt%3Dmedia%26token%3D612954a9-294e-4aee-b1ad-1d13ce699b01\&width=768\&dpr=4\&quality=100\&sign=4354ee63\&sv=2)

After ensuring all data is given correctly, click the Authorization button and follow the steps. The authorization process should result in "Authorized successfully".

### Incoming and outgoing settings <a href="#incoming-and-outgoing-settings" id="incoming-and-outgoing-settings"></a>

When the OAuth Credential is authorized successfully, new Incoming and Outgoing Connections can be added. This way, the Connections themselves do not have to be authorized one by one.

If an existing, standard Connection with Connection mode: Microsoft Graph with OAuth2 should be changed to a Connection with Grant flow credential, please delete the Connection first and recreate it instead of just changing the OAuth2 Credentials.

![](https://docs.meta-inf.hu/email-this-issue/~gitbook/image?url=https%3A%2F%2F880912854-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Mf8H-oTE_fhOrUtfYrN-2724419853%252Fuploads%252FaevW7PPyFLODJE4S0UuC%252FMicrosoft-grant-outgoing-connection.jpeg%3Falt%3Dmedia%26token%3D434f60ba-cf72-4e09-9ab9-8f383b868e57\&width=768\&dpr=4\&quality=100\&sign=26e1a4f3\&sv=2)![](https://docs.meta-inf.hu/email-this-issue/~gitbook/image?url=https%3A%2F%2F880912854-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Mf8H-oTE_fhOrUtfYrN-2724419853%252Fuploads%252FYt6ik3kQle535ds8I4hy%252FMicrosoft-grant-incoming-connection.jpeg%3Falt%3Dmedia%26token%3D8168d395-bf64-4168-94e9-46411ca86c65\&width=768\&dpr=4\&quality=100\&sign=ce516101\&sv=2)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meta-inf.hu/email-this-issue/email-this-issue-for-jira-server-data-center/documentation/administration/oauth2-authorizations-in-email-this-issue/enabling-oauth2-authorization-in-your-microsoft-account-grant-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
