Grant and restrict Microsoft Graph permissions for mail sent by a white-labeled app.
The mentioned functionalities may be restricted depending on the purchased software license.
This guide explains how to grant your organization's admin consent to our multi-tenant mail sending app and restrict its access so that it can only send emails from a designated mailbox (for example, noreply@yourdomain.com). Even if you have limited IT experience, the step-by-step instructions and prerequisites provided here will help you complete the setup using tools installed on your PC.
Note:
If you need assistance, please create a support ticket at eniris.io/support.
Our mail sending app uses the Microsoft Graph API with application permissions to send emails from a designated mailbox. To enable this functionality, your admin must:
noreply@yourdomain.com).These details can be found in your tenant overview at Microsoft Entra.
Before you begin, please ensure you have the following:
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser
Construct the Admin Consent URL:
Use the following URL format. Replace <YOUR-DOMAIN-NAME> with your actual domain name (for example, if your domain is "contoso.com", use that):
https://login.microsoftonline.com/<YOUR-DOMAIN-NAME>/adminconsent?client_id=03126c25-5828-4b2e-aa6d-d97380cb1cb5&redirect_uri=https://eniris.io
Visit the URL:
Have your Microsoft 365 global admin log into their browser and navigate to the URL. They will see a consent dialog listing the permissions our app is requesting (for example, Mail.Send).
Grant Consent:
The admin should click "Accept" to grant consent. This action will create a service principal for our app in your tenant and allow it to send emails.
Notify Us:
After granting consent, please create a ticket eniris.io/support with the following details:
noreply@yourdomain.com).Our onboarding process will capture your tenant ID automatically when the admin grants consent. However, if you need to manually verify this, you can:
For security best practices, we'll create a dedicated security group and use it to restrict the app's access to only your designated mailbox. This implements the principle of least privilege, ensuring the app can only access what's absolutely necessary.
Log into the Microsoft 365 Admin Center:
Go to admin.microsoft.com and sign in with your admin account.
Create a Security Group:
noreply@yourdomain.com account as a memberOpen PowerShell:
Run PowerShell as an administrator on your PC.
Connect to Exchange Online:
Install the ExchangeOnlineManagement module (if not already installed) and then connect:
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser
Connect-ExchangeOnline -UserPrincipalName "<YOUR-ADMIN-EMAIL>" # For example: admin@yourdomain.com
Create the Application Access Policy:
Run the following command. Replace <YOUR-SECURITY-GROUP-EMAIL> with the actual email address or Object ID of your security group:
New-ApplicationAccessPolicy -AccessRight RestrictAccess -AppId "03126c25-5828-4b2e-aa6d-d97380cb1cb5" -PolicyScopeGroupId "<YOUR-SECURITY-GROUP-EMAIL>" -Description "Restrict app access to the noreply mailbox only"
Verify the Policy:
Test that the policy works by running (replace with your actual noreply email address):
Test-ApplicationAccessPolicy -Identity "<YOUR-NOREPLY-EMAIL>" -AppId "03126c25-5828-4b2e-aa6d-d97380cb1cb5"
Test-ApplicationAccessPolicy to verify access restrictions