cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Login User via Azure AD - Bad Request Error

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.
4 REPLIES 4
Highlighted
Super User
Super User

Re: Login User via Azure AD - Bad Request Error

Hi @Blair24 ,

 

I found the same problem here: https://powerusers.microsoft.com/t5/Power-Virtual-Agents-Forum/How-to-get-PVA-to-authenticate-user-i...

You can follow this topic and wait for the answer 🙂


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Please, vote in my app (YouTube App using Power Apps): https://powerusers.microsoft.com/t5/Demo-Extravaganza-2020/YouTube-app-using-Power-Apps/cns-p/596244
Highlighted
Frequent Visitor

Re: Login User via Azure AD - Bad Request Error

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

Highlighted

Re: Login User via Azure AD - Bad Request Error

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.

Highlighted
Super User
Super User

Re: Login User via Azure AD - Bad Request Error

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 😉 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Please, vote in my app (YouTube App using Power Apps): https://powerusers.microsoft.com/t5/Demo-Extravaganza-2020/YouTube-app-using-Power-Apps/cns-p/596244

Helpful resources

Announcements
PVA Thumb

Video of the Week

Show/Hide Bots (PVA) In Users Preferred Language on Power Apps Portals

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

PVA Multi Language

Power Virtual Agents Gaining Traction

Power Virtual Agents is now available in more languages.

PVA Bot Variables

Power Virtual Agents Bot Variables

Reusing variables across topics, and setting variable values from external sources.

BOT Sharing Gallery

BOT Sharing Gallery is now LIVE!

Want to Share a ChatBot? Post it in our Bot Sharing Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (7,575)