web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / PVA Bot authentication...
Copilot Studio
Unanswered

PVA Bot authentication with Slack

(0) ShareShare
ReportReport
Posted on by

Hi everyone, I'm creating an internal use only PVA bot for employees at my company.  They will chat with the bot via Slack.  I want to enable authentication using the Generic OAuth2 option in PVA authentication so that my bot will know who the user is that it's talking to for opening tickets, addressing them by name, etc.  The problem is, I don't understand what I'm looking for for many of these fields as Slack doesn't use the same terminology as PVA and I'm not a dev 🙂

 

I created an app with Slack for my bot, and I have the client ID, secret, scope list delimiter figured out.  I believe authorization URL template is "https://slack.com/oauth/authorize" and Token URL template is "https://slack.com/api/oauth.access" but for the rest I am lost.

 

Authorization URL query string template

Token URL query string template

Token body template

Refresh URL template

Refresh URL query string template

Refresh body template

Token exchange URL (required for SSO)

Scopes

 

I'm really hoping that someone can point me to a filled out example form for Slack.  I can't possibly be the first person attempting this, can I?

 

Thanks!

 

Categories:
I have the same question (0)
  • drewf7 Profile Picture
    2 on at

    Hi!

     

    I know this is a bit of an older post, but this came up when I was searching around for instructions on how to configure the generic OAuth2 provider, and since I figured it out I wanted to come back and leave some help in case someone else follows a similar path.

     

    This article from a blog called Project 365 ended up having the variable names I was looking for in order to configure things like "Token body template".

     

    I've copied the relevant section below. Instead of using the login.microsoftonline.com endpoints you would use whatever endpoints your IDP (Slack in this case) have documented for OAuth2.

     

    1. Client ID : Paste the application (client) id of the app identity.
    2. Client Secret : Paste the secret key that was created in the app registration portal for your app
    3. Scope : The list of scopes (API permissions) the authenticated users to have once signed in. This should match with the API permissions of PVA Bot app. 
    4. Scope List delimiter: Indicates the separator character for the scope list. This can’t be empty, and so set this field to , (comma)
    5. Authorization URL Template : Microsoft identity authorization end point is https://login.microsoftonline.com/common/oauth2/v2.0/authorize
    6. Authorization URL Query String Template : This field should set to the list of query parameters that will be appended to the authorization end point. Set this field to ?client_id={ClientId}&response_type=code&redirect_uri={RedirectUrl}&scope={Scopes}&state={State}
    7. Token URL Template : Microsoft identity token end point to get access tokens. This field is set to https://login.microsoftonline.com/common/oauth2/v2.0/token
    8. Token URL Query String Template : Usually this is a question mark ?
    9. Token Body Template : This field is the template of the token body. This field is set to code={Code}&grant_type=authorization_code&redirect_uri={RedirectUrl}&client_id={ClientId}&client_secret={ClientSecret}
    10. Refresh URL Template : Microsoft identity token end point to refresh access tokens. This field is set to https://login.microsoftonline.com/common/oauth2/v2.0/token
    11. Refresh URL Query String Template : Usually this is a question mark ?
    12. Refresh Body Template : This field is the template of the refresh token body. This field is set to refresh_token={RefreshToken}&redirect_uri={RedirectUrl}&grant_type=refresh_token&client_id={ClientId}&client_secret={ClientSecret}

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 198 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard