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 / Login User via Azure A...
Copilot Studio
Unanswered

Login User via Azure AD - Bad Request Error

(1) ShareShare
ReportReport
Posted on by 25
Hey folks,
 
Tried following the documentation to log a user - using Azure AD, have the following settings follow but I keep getting a bad request error. Anyone else came across this?
 
Scope List delimiter: ,
 
 
Authorization URL Query String Template: ?client_id={ClientId}&response_type=code&redirect_uri={RedirectUrl}&scope={Scopes}&state={State}
 
Token URL Template: https://login.microsoftonline.com/common/ oauth2/v2.0/token
 
Token URL Query String Template: ?
 
Token Body Template: code={Code}&grant_type=authorization_code&redirect_uri={RedirectUrl}&client_id={ClientId}&client_secret={ClientSecret}
 
Refresh URL Template: https://login.microsoftonline.com/common/ oauth2/v2.0/token
 
Refresh URL Query String Template: ?
 
Refresh Body Template: refresh_token={RefreshToken}&redirect_uri={RedirectUrl}&grant_type=refresh_token&client_id={ClientId}&client_secret={ClientSecret}
 
Scopes: openid
 
Azure App has the correct redirect url and the correct priviliages as well.
I have the same question (0)
  • CU22081450-0 Profile Picture
    Most Valuable Professional on at

    Hi @Blair24 ,

     

    I found the same problem here: https://powerusers.microsoft.com/t5/Power-Virtual-Agents-Forum/How-to-get-PVA-to-authenticate-user-in-portal/m-p/415039#M227

    You can follow this topic and wait for the answer 🙂

  • Blair24 Profile Picture
    25 on at

    @renatoromaoI got this working yesterday by replacing the Token URL Template & Refresh URL Template with the Azure App URLs.

  • CleberM Profile Picture
    on at

    Thanks for letting us know and the feedback, @Blair24 . I'll update the documentation so it's clear those need to be updated to your specific AAD URL / Provider URL.

  • CU22081450-0 Profile Picture
    Most Valuable Professional on at

    Hi @Blair24 ,

     

    Try to use the documentation below, the sample is using Power Automate + Authentication (I think that probably will work for you)

    If you need anything, let me know 😉 

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 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard