Watchdoc - Notifications - Configure Notifications app. in Microsoft Entra
Principle
You must register the Watchdoc Notification application among the applications authorised to access MS Outlook365, then configure this application.
This configuration is carried out in the Microsoft Entra management interface.
Procedure
Register EWatchdoc Notifications app. in MS Entra
-
Log in as an administrator to your MS Entra portal.
-
In the Entra ID menu, click App registration:
-
In the App registration interface, click New registration:Admin_Config_MS365_1_EN.png
-
In the Register an application (Registration) interface, complete the following fields:
-
Name: give the application a name (Watchdoc Notifications, for example). This name is only displayed in the Entra administration interface.
-
-
Account types supported: select Accounts in this organisation directory only - Single tenant, in order to restrict use of the application.
-
Click Register:
-
In the Overview interface of the created application, the information required to configure notifications in is displayed:
-
Application (client) ID: identifier of the application as registered in MS Entra
-
Object ID: property identifier of the application.
-
Manage API permissions
-
In the Overview interface of the created application, click Authorised APIs in the menu;
-
in the interface, click Add Authorisation.
-
Select the Microsoft Graph API set > Microsoft Graph:
-
Then select Delegated permissions:
-
in the search engine, search for and select the following permissions:
-
email (view users' email addresses)
-
offline_access (retain access to the data you have given them access to),
-
User.Read (enable login and read user profile).
-
-
Then click Add permissions:
èAdded permissions are displayed in the Configured Permissions interface.
-
Back in the Authorised APIs interface, click on APIs used by my organisation in the right-hand section.
-
Search for and select the Office 365 Exchange Online API:
-
Click on Application permissions and search for SMTP.
-
Tick SMTP.SendAsApp to authorise it,
-
then click on Add permissions:
è The application is displayed with the status ‘Not granted for [my organisation]’.
Grant admin consent
-
Click on the Grant admin consent for [Organisation Name] button:
-
Then confirm your consent:
Give a Secret to the app.
You must assign a password specific to the application (Secret).
-
In the Application Overview interface, Manage menu, click Certificates & Secrets:
-
click New Client Secret:
-
in the Add Client Secret interface, complete the following fields:
-
Description: enter a description for the password (which will be automatically generated by Entra);
-
Expiration date: the date on which the secret expires.
N.B.: Once this date has passed, you will need to generate a new one and update the Notifications configuration in Watchdoc.
Declare the Exchange Online application
The app installation must be finalised using PowerShell commands. To do this, you will need the following information:
-
tenant-id : available on the Microsoft Entra homepage:
-
object-id : available in the properties of the app created in Entra;
-
application-id : available in the properties of the app created in Entra;
-
service-principal-id : provided in the command prompt after the command Get-ServicePrincipal | fl
-
As an administrator, open a command prompt and enter the following commands to install the ExchangeOnlineManagement module and connect to Exchange:
Install-Module -Name ExchangeOnlineManagement -allowprerelease
Import-module ExchangeOnlineManagement
Connect-ExchangeOnline -Organization <tenantId>
-
Then declare the application:
New-ServicePrincipal -AppId <APPLICATION_ID> -ObjectId <OBJECT_ID> [-Organization <ORGANIZATION_ID>]
-
Retrieve the ID generated by Exchange:
Get-ServicePrincipal | fl
-
In the displayed data, copy the value corresponding to the ID:
-
Using the id value, authorise the application to use the mailbox:
Add-MailboxPermission -Identity "notifications@mon-organisation.com" -User <SERVICE_PRINCIPAL_ID> -AccessRights FullAccess
Check the notification
-
Once this operation is complete, you can check the system status in the Notifications interface:
-
In addition, you can check whether a notification has been sent (cf. Check notifications).