Registering Application in Microsoft Identity Platform
To register an application in Microsoft Identity platform, do the following:
- Sign in to Microsoft Identity platform using an account that you want to use for sending emails. The account must have an active subscription.
 - Register an application. For more information on registering applications, see this Microsoft article.
 - Select API permissions and grant the application the Mail.Send permission of the Application type for the Microsoft Graph API.
 - Select Authentication > Platform configurations > Add a platform > Configure platforms > Mobile and desktop applications and specify http://localhost as a redirect URI. For more information, see this Microsoft article.
 - Record the following data required for acquiring an access token:
 
- Directory (tenant) ID
 - Application (client) ID