Skip to main content
Skip table of contents

MS Graph APIs OAuth2 Authentication

This authentication method is still supported by Imagicle UCX Suite release, and it relays on EWS-based OAuth2 authentication against MS Office 365 email service.

Requirements

To enable Imagicle UCX Suite to handle outbound email notifications and to handle email-to-fax service, leveraging Graph APIs-based OAuth2 authentication, you must configure an application on Azure Web Portal, taking note of Application ID, Directory ID and Client Secret data, needed later on while configuring this authentication method on Imagicle UCX Suite. Please find below the procedure.

Azure web portal configurations

Please access to Azure portal and go to "App Registrations":

image-20251112-143134.png
image-20251112-143205.png

Click on "New registration" and add a name of your choice like "ImagicleEmailProvider". Then select "Accounts in this organizational directory only" and hit "Register"

image-20251112-143340.png

The following window appears, including Application ID and Directory ID. Please copy both data, for later usage.

image-20251112-143456.png

Now please click on "Certificates & secrets" option, included in left pane, and add a new "client secret" with the name of your choice and a long expiration period.

image-20251112-143555.png

Once added, you'll get some data associated to it. Please copy "Value" field for later usage. Copy the field immediately after having created the client secret, because it will be automatically hidden after few minutes, for security reasons.

image-20251112-143634.png

Now click on "Add permissions" and select "API’s my organization uses". Then search for "Office 365 Exchange Online".

image-20251112-143742.png

Select "Office 365 Exchange online" and then click on "Application Permissions"

image-20250113-103536.png

From the list of available permission levels, please search for the following items:

  • IMAP.AccessAsApp

  • POP.AccessAsApp

  • SMTP.SendAsApp

Once permission has been assigned, you must authorize them for your organization, by clicking on "Grant admin consent for <company_name>".

image-20251112-144111.png

Now access to the list of Enterprise Applications and locate the "ImagicleEmailProvider" application:

image-20251112-144934.png

Copy the “Object ID” for later usage.

PowerShell configurations

Please run PowerShell as Administrator and execute the following commands:

  • Set-ExecutionPolicy RemoteSigned 

  • Install-Module ExchangeOnlineManagement

  • Connect-ExchangeOnline

Authenticate with your full admin Tenant account

Execute the following command:

POWERSHELL
New-ServicePrincipal -AppId <ApplicationID> -ServiceId <ObjectID> -DisplayName AnyNameYouLike

where <ApplicationID> and <ObjectID> must be replaced with previously copied values.

Now execute the following command:

POWERSHELL
Add-MailboxPermission -Identity <email> -User <ObjectID> -AccessRights FullAccess

where <email> should be replaced with the dedicated account to be used by Imagicle applications.

<ObjectID> is the previous one associated to the Enterprise App.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.