Hello Team,
I am using UiPath Integration Service connectors to send emails via Microsoft Outlook 365 in UiPath Orchestrator. The bot uses the Send Email activity in UiPath Studio, which relies on this connection.
Issue Details:
- The Outlook connector is successfully connected initially and the bot is able to send emails without issues.
- However, after approximately 3-4 hours, the connector automatically disconnects, as shown in below image.
- When this happens, the bot fails to send emails.
- I manually fix the connector by reconnecting it, after which the bot can send emails again.
- This cycle repeats every 3-4 hours, causing repeated email sending failures.
- Connector is set up in UiPath Orchestrator Integration Service under.
Thank you in advance for your support!
Hi @Aman_Agrawal ,
This usually happens when you’re using delegated authentication. The token expires after a few hours, and if the refresh token is missing, the connector disconnects.
To fix this, I recommend switching to application-based authentication (client credentials). It’s more stable for unattended bots and doesn’t rely on user sessions.
Hope this helps!
@Aman_Agrawal
check below statements, which was given by LLM
UiPath Integration Service connections disconnecting after 3 hours in an unattended process is likely due to token expiration in the OAuth 2.0 authentication flow. Since delegated tokens expire within an hour, you should use application permissions (Client Credentials flow) for unattended bots to avoid this.
Explanation:
UiPath Integration Service connections, especially those using Microsoft Graph API, often rely on OAuth 2.0 for authentication. This typically involves delegated tokens, which have a limited lifespan (often 60 minutes). When these tokens expire, the connection to the service (like Outlook 365 or Teams) is dropped, causing the automation to fail.
Solution:
To address this, you should configure your Integration Service connections to use application permissions (Client Credentials flow). This approach doesn’t rely on user-specific tokens and uses a client ID and secret for authentication, which should not expire as frequently.
Steps:
- Azure Portal Setup: Go to the Azure portal and navigate to App registrations.
- Register your application: Register a new application (or use an existing one) in Azure Active Directory.
- Configure API Permissions: Add the necessary Microsoft Graph API permissions for your application. Make sure to select “Application permissions” instead of “Delegated permissions”.
- Generate Client Secret: Generate a client secret for your application.
- UiPath Integration Service: In UiPath Orchestrator, configure your Integration Service connector (e.g., for Outlook 365 or Teams) to use the client ID and secret obtained in the previous steps.
Important Considerations:
Carefully choose the specific application permissions needed for your automation to minimize the scope of access.
Store the client secret securely and avoid hardcoding it directly into your workflows.
If you continue to experience issues, review the UiPath Integration Service logs and the Azure Active Directory sign-in logs for more detailed error information.
By switching to application permissions, you can establish a more robust and reliable connection for your unattended automation processes using UiPath Integration Service.