cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Blair24
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
renatoromao
Super User
Super User

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 (+2.300 students | PROMOTIONS) : English | Português

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

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.

renatoromao
Super User
Super User

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 (+2.300 students | PROMOTIONS) : English | Português

Helpful resources

Announcements
March Update

Welcome to the User Group Private Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (77,571)