Steps for App Registration and Create Client Secret
From the left menu, select App registrations.
Click > +New registration above the application list.
Provide Application Name.
Choose Supported Account Types.
Click > Register button. You will be automatically redirected to the new application settings page.
In the Essentials section at the top of the page, copy the following variables:
Application (Client) ID
Directory (Tenant) ID
From the left menu, select Certificates & secrets.
Click > New client secret button.
Provide a Description that will help you remember how or where the secret is going to be used.
Choose an Expires period.
Click > Add button. A new client secret will be generated.
Copy the secret BEFORE refreshing the page. Once the page is refreshed, the secret cannot be copied any longer and will need to be entered manually (later).
<< END >>
Steps to set API Permissions
Go to Azure Portal > App Registrations > Your App.
From the left menu, select Authentication.
Choose Yes for “Allow public client flows”.
Click > Save button to apply the changes.
From the left menu, select API Permissions.
Click > +Add a permission above the list with all assigned permissions.
Choose "Application Permission".
Choose Microsoft Graph in the right panel.
Choose API permissions.
Delete the auto-added API permission "User.Read".
Grant the following API permissions
Microsoft Graph > Application permissions
+ Mail.Read
+ Mail.ReadWrite
+ Mail.Send
For all added API permissions, ensure that admin consent is granted (via button "Grant admin consent for ...").
<< END >>