Why aren't Notifications from Test Manager dispatched if Test Set Execution is invoked via the UiPath REST API?
Issue description:
When executing a Test Set in UiPath Test Manager using an external application, the test runs successfully, but no email notification is received. This issue prevents users from being notified about test execution status, potentially delaying response times and issue tracking.
Root Cause:
The issue occurs because the authentication token used for execution was generated using Application Scopes instead of User Scopes.
- Application Scopes: When a token is created with application scopes, it does not associate the execution with a specific user, preventing UiPath from sending notifications.
- User Scopes: When a token is generated with user scopes, the execution is performed on behalf of the user, enabling email notifications to be triggered correctly.
This behavior has been verified using Postman and SOAPUI, where test executions performed with application scopes did not trigger any email notifications. The solution below was performed using Postman. If user scopes are already in place and no notification is received, then check the notification settings.
Resolution:
To receive email notifications after executing a test set from an external application, follow these steps to generate a User-Scoped Token:
Step 1: Generate a User-Scoped Token
- Go to UiPath Orchestrator Admin → External Applications and click "Add Application".
- Enter a name for the application.
- Choose "Confidential Application".
- Add the necessary scopes required for execution.
- Enter the Callback URL based on your method:
- For Postman Desktop: https://oauth.pstmn.io/v1/callback
- For Postman Browser: https://oauth.pstmn.io/v1/browser-callback
- Click "Add" and copy the generated keys.
Ref: Automation Cloud - Managing external OAuth applications
Step 2: Configure Postman to Get the Access Token
- In Postman, go to Authorization and choose OAuth 2.0.
- Click "Get New Access Token" and enter the following details:
- Token Name: Choose any name.
- Callback URL: Same as used in Orchestrator.
- Auth URL: https://cloud.uipath.com/identity_/connect/authorize
- Access Token URL: https://cloud.uipath.com/identity_/connect/token
- Client ID & Secret: Use the values copied from Orchestrator.
- Scopes: Enter the scopes selected during application setup.
- Click "Get new access token", and Postman will generate a user-scoped token.
Step 3: Execute the Test Set with the New Token
Use the generated user-scoped token to make a request to the following endpoint:
/api/v2/projectid/testsets/id/startexecute (Replace projectid and id with the actual project and test set IDs.)
Step 4: Validate Email Notification
- Run the execution using the user-scoped token.
- Check if an email notification is received upon completion.
- If notifications are still missing, verify the notification settings
Conclusion:
- By using User Scopes instead of Application Scopes when generating the authentication token, UiPath Test Manager can correctly associate test executions with users, allowing email notifications to be sent. Ensuring the proper permissions and using the correct API endpoint will allow for a seamless execution process with notifications.


