This configuration is part of the email forwarding feature available for the platform. This configuration step is only required for Power Automate flows which use email attachments, and occurs after you:
- Configure your Webhook Setup record in the Nextworld platform. Learn more in the Automate email forwarding with webhooks topic in Nextworld Help.
- Configure your Power Automate flow. Learn more in (IDP-Email forwarding) Power Automate Setup for forwarding emails into the platform.
Microsoft Graph OAuth Setup
To set up your endpoint and permissions for an Outlook account, you can use either Application permissions or Delegated permissions.
Prerequisites
-
Microsoft 365 or Azure account with premium
-
Admin access
Step 1 — Register an Application
- Go to Microsoft Entra admin center
- Navigate to Application Registrations and select New Registration
- Enter an application name
- Select the appropriate supported account type (typically Single tenant)
- Select Register
Copy the following from the Application Overview page:
- Tenant ID
- Client ID
Step 2 — Create a Client Secret
- Open the registered application
- Navigate to Certificates & Secrets
- Select New Client Secret
- Choose an expiration period
- Select Add
- Record the Secret value.
Step 3 - API permissions
For Delegated permissions:
- Navigate to API Permissions
- Select Add a Permission
- Choose Microsoft Graph
- Select Application Permissions
- Add Mail.Read, offline_access, openid, profile, User.Read (all type = Delegated)
- Select Grant Admin Consent. You may need a system administrator to allow this.
For Application permissions:
- Navigate to API Permissions
- Select Add a permission
- Choose Microsoft Graph
- Select Application Permissions
- Add Mail.Read - type Application
Step 4 - Authentication
If you are using delegated permissions, add a redirect URL such as h ttps://{yourdomainname}/
For example, https://apps.nextworld.net/
Platform Configuration Steps
Delegated Microsoft Permissions:
In the Endpoint Definitions application, open the InboundEmails record and enter the endpoint URL: https://graph.microsoft.com/v1.0/me/messages/{UNSOEmailMessageId}/attachments/{UNSOEmailAttachmentId}/$value
Then, navigate to the OAuth Setup application and create a record of type Authorization Code with:
-
3rd Party OAuth2 Auth Server URL: Retrieve from your configuration in Azure or Microsoft 365. It will be formatted like h ttps://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize with your personal tenant-id in the curly brackets.
-
3rd Party OAuth2 Access Token URL: h ttps://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token with your personal tenant-id in the curly brackets.
-
Client ID: Retrieve from your configuration in Azure or Microsoft 365.
-
Scope: openid profile offline_access User.Read Mail.Read
-
Select the Exclude Fragment checkbox.
Application Microsoft Permissions:
In the Endpoint Definitions application, open the InboundEmails record and enter the endpoint URL: https://graph.microsoft.com/v1.0/users/{UNSOEmailRecipients}/messages/{UNSOEmailMessageId}/attachments/{UNSOEmailAttachmentId}/$value in the Endpoint Definition record.
Then, navigate to the OAuth Setup application and create a record of type Client Credentials with:
-
3rd Party OAuth2 Auth Server URL: Retrieve from your configuration in Azure or Microsoft 365. It will be formatted like h ttps://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize with your personal tenant-id in the curly brackets.
-
3rd Party OAuth2 Access Token URL: h ttps://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token with your personal tenant-id in the curly brackets.
-
Client ID: Retrieve from your configuration in Azure or Microsoft 365.