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,

Connect with me here 😉

Power Virtual Agents course (+1.000 students): https://www.udemy.com/pva-beginners
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,

Connect with me here 😉

Power Virtual Agents course (+1.000 students): https://www.udemy.com/pva-beginners

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (10,592)