hi @Amira Abdellatif,
We've run into a similar challenge when integrating Genesys Cloud with Microsoft Graph APIs that only support delegated permissions.
The main limitation is that Genesys Cloud Data Actions and most native integration patterns are designed around either:
- Static credentials/API keys
- OAuth client credentials (application permissions)
- Secure calls to an intermediary service
They are not ideal for managing and refreshing per-agent delegated OAuth tokens.
In your scenario, I would avoid storing refresh tokens directly within Genesys Cloud. Instead, I would consider introducing a lightweight middleware layer that:
- Performs the Authorization Code flow when the agent first signs in.
- Securely stores the access/refresh tokens in an external vault or database.
- Maps the Teams user to the corresponding Genesys Cloud user.
- Handles token refresh automatically when triggered by Genesys Cloud.
- Exposes a simple API endpoint that Genesys Cloud Data Actions can invoke.
This approach keeps OAuth lifecycle management outside of Genesys Cloud and avoids the complexity of maintaining delegated tokens within Architect flows or Data Actions.
Another consideration is Microsoft Teams presence ownership. Since delegated permissions operate in the user's security context, you'll need to ensure refresh tokens remain valid across sign-outs, password changes, MFA policies, and conditional access requirements. In practice, these operational aspects often become more challenging than the actual Graph API integration.
From an architecture perspective, a serverless component (Azure Function, Logic App, or API App) acting as the token broker has worked well in environments where application permissions were not available.
I'm curious whether you've evaluated the native Genesys Cloud for Microsoft Teams integration and if there's a specific business requirement that prevents using presence synchronization through the standard integration path. Understanding that constraint may help identify a simpler alternative.
------------------------------
Cesar Padilla
INDRA COLOMBIA
------------------------------