Email import
Last updated
Last updated
The Microsoft Graph REST API can be used to access a user’s mailbox in the cloud on Exchange Online as part of Office 365.
Applicable Ultimo version: Rolling Release (Azure cloud)
To use OAuth to access a user’s mailbox using the Microsoft Graph API the Ultimo application must be registered with Azure Active Directory.
Go to the and sign in. This account must be in the same directory as the account that will be used to access Exchange.
Select Azure Active Directory and then select App Registrations in the left side menu.
Click on New Registration and use the following values:
Enter a Name for the application
For Supported account types choose Accounts in this organizational directory only
For Redirect URI choose Web and enter https://{customer}.ultimo.net/OAuth2Callback
where {customer}
should be replaced with the actual customer environment
Click Register. Then copy the value of the Application (client) ID and the Directory (tenant) ID and save it. This will be needed later.
Select Certificates & secrets in the left side menu and click New client secret. Enter a description and click Add.
Copy the Value of the added client secret and save it.
Two types of permissions can be used:
Application permissions
Delegated permission
Application permissions
Go to API permissions
Choose Microsoft Graph, select Application permissions and then add the following permissions: Mail.ReadWrite
Delegated permissions
When using delegated permissions, the signed-in user must have access to mailboxes that are used for email import.
Go to API permissions
Choose Microsoft Graph, select Delegated permissions and then add the following permissions: Mail.ReadWrite
The application that was registered in the previous steps can be used to create a credential in Ultimo.
Go to the UCTool and select Credentials under Authorisation.
Click on the plus icon to create a new credential and use the following values:
Enter an Id and Description for the credential
When using application permissions, choose Client credentials as Grant type
When using delegated permissions, choose Authorization code as Grant type
When using delegated permissions, for Authorization URL enter https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize?prompt=select_account
where {tenant-id}
should be replaced with the Directory (tenant) ID that was copied in the previous steps
For Access token URL enter https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token
where {tenant-id}
should be replaced with the Directory (tenant) ID that was copied in the previous steps
For Client Id enter the value of the Application (client) ID that was copied in the previous steps
For Client secret enter the value of the added client secret that was copied in the previous steps
When using application permissions, enter https://graph.microsoft.com/.default
as Scope
When using delegated permissions, enter Mail.ReadWrite offline_access
as Scope
Click on the save icon.
Click on the key icon in the toolbar to get an access token.
You will be redirected to the Microsoft login screen. Sign in with the account that will be used to access the mailbox(es).
You will be redirected back to Ultimo.
The credential with the access token can now be used to authenticate with the Microsoft Graph API to access a mailbox. Apply the credential on the Email server accounts that have been set up in Ultimo.
Note: the steps below will grant Ultimo access to all mailboxes in your organisation. To limit this, create an .