Skip to content
Mint Service Desk Documentation centre

Microsoft Graph Api

Register a Microsoft Entra application, grant mail permissions and connect a mailbox through Microsoft Graph API.

Open the Microsoft Graph API mailbox configuration form.

Registering the application

First go to https://portal.azure.com Sign in and go to Microsoft Entra ID services.

Go to “App” and ‘App registration’

The following form will appear.

Complete the registration form:

  • in ‘Name’ field type your preferred name
  • ‘Supported Account Types’: leave it as it is
  • ‘Redirect URL’: Select “Web” option.

Copy Application (client) ID and Directory (tenant) ID

Paste them here:

API permissions

After the registration go to the Manage > API permissions located in the sidebar on the left.

Press the button. Then, from the window that slides out on the right side of the screen, select the “Microsoft Graph” option.

From the two available options, select the one on the right - Application permissions

In the Mail section, select the following options:

To save the rights, press the button.

You may see a request for administrator approval:

Domain administrator approval is required to grant permissions (read, write, send). It is recommended that domain administrators narrow Graph application access to only the required email addresses. By default, permissions will be granted to the entire domain (for each email address in the domain).

Application access policy

To configure an application access policy and limit the scope of application permissions:

Connect to Exchange Online PowerShell:

  • To require all PowerShell scripts that you download from the internet are signed by a trusted publisher, run the following command in an elevated Windows PowerShell window (a WindowsPowerShell window you open by selecting Run as administrator)

Set-ExecutionPolicy RemoteSigned

  • Install ‘ExchangeOnlineManagement’ tool for managing the Exchange Online Services

Install-Module -Name ExchangeOnlineManagement

  • Login to the Exchange Online Powershell (a login pop-up will prompt out)

Connect-ExchangeOnline -UserPrincipalName {your-admin-account@your-domain.com}

Identify the app’s client ID and a mail-enabled security group to restrict the app’s access to. Identify the app’s application (client) ID in the Azure app registration portal. Create a new mail-enabled security group or use an existing one and identify the email address for the group:

  • You must have Microsoft 365 admin permissions to access the Exchange admin center. For more information, see Permissions in Exchange Online.
  • sign in to Microsoft 365 or Office 365 using your work or school account, and then choose the Admin tile.
  • In the Microsoft 365 admin center, choose Admin centers > Exchange.
  • In the EAC, navigate to Recipients > Groups.
  • Click New > Security groups and fill all necessary fields.

Create an application access policy.

  • Run the following command, replacing the AppId, PolicyScopeGroupId, and Description arguments
  • New-ApplicationAccessPolicy -AppId e7e4dbfc-046f-4074-9b3b 2ae8f144f59b -PolicyScopeGroupId EvenUsers@contoso.com -AccessRight RestrictAccess -Description “Restrict this app to members of distribution group EvenUsers.”

Note: Changes to application access policies can take more than 1 hour to take effect in Microsoft Graph REST API calls.

Client secret and saving

Then go to the Certificates & secrets section.

Once you are in this section press the button.

Enter a recognisable name in Description. In Expires, keep the default of 6 months or choose another validity period.

To approve the operation press the button.

After saving, copy Value.

Client secret values cannot be viewed, except for immediately after creation. Be sure to save the secret when created before leaving the page.

Paste the copied value into MINT in the Client secret section

The configuration should look similar to this:

To save the mailbox configuration press the button.