Here are some direct ways and parts of this are from AI, but some is just their standard documentation.
Slack does not support OAuth sign-in cards, so users see “Please sign in to continue” without a way to authenticate.
Solution:
Implement manual authentication using a custom OAuth flow and token exchange.
Steps:
Send a custom sign-in link to the user in Slack.
After sign-in, capture the token and send a signin/tokenExchange event to Copilot Studio.
Ensure your relay service (Logic App or bot) handles this event and passes the token correctly.
Authentication Options:
Use Azure AD v2 with a registered app.
Configure Copilot Studio to require sign-in.
Handle token exchange manually via your relay service.
Once users are authenticated:
You can access user properties like User.Email, User.DisplayName, and User.Id.
Use these to deliver personalized content from internal SharePoint sources.
Ensure the agent is configured to use authenticated context when querying knowledge sources.
Best Practices
Use manual authentication with fallback messaging.
Test token exchange thoroughly in a sandbox.
Consider using Direct Line API for more control over message flow.
Use Power Automate or Azure Logic Apps to bridge Slack and Copilot Studio securely.