Using Microsoft Graph API
If you prefer to use the Microsoft Graph API, additional configuration is required.
Step 1: Update API Scopes in Azure
Add the following scopes to your Azure OAuth2 application:
- Access Azure Portal: Log in to Azure Portal and navigate to your app.
- API Permissions: Go to API Permissions > Add a permission > Microsoft Graph > Delegated permissions.
- Add Scopes:
User.ReadBasic.All
Mail.ReadWrite.Shared
Mail.Send.Shared
Step 2: Update Scopes in EmailEngine
Navigate to OAuth2 Application: In EmailEngine, go to your OAuth2 application's settings.
Edit Additional Scopes:
Find the Additional Scopes section.
Add the following scopes:
User.ReadBasic.All Mail.ReadWrite.Shared Mail.Send.Shared
Save Changes: Click Save to apply the new scopes.
Step 3: Refresh OAuth2 Grant for Main Account
To use the new permissions, update the OAuth2 grant for the main account.
- Option 1: Re-add the Main Account
- Delete and re-add the main account in EmailEngine.
- Option 2: Generate a New Authentication URL
- Create Authentication Link:
- Use the Authentication Form API.
- Set
account
to your main account's ID (e.g.,"my-account"
). - Set
type
to your OAuth2 application's ID in EmailEngine.
- User Authentication:
- Provide the link to the main account user.
- The user must open the link and grant the new permissions.
- Create Authentication Link:
Step 4: Add or Reconnect Shared Mailboxes
With updated permissions:
- Add New Shared Mailboxes: Use the Account API as previously described.
- Reconnect Existing Mailboxes: If shared mailboxes were added before, use the Reconnect API to refresh their access.