Skip to main content

Notifications

Publish & Channel Management
Unanswered

Login User via Azure AD - Bad Request Error

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.
  • renatoromao Profile Picture
    renatoromao 6,762 on at
    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 😉 

  • CleberM Profile Picture
    CleberM on at
    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.

  • Blair24 Profile Picture
    Blair24 25 on at
    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.

  • renatoromao Profile Picture
    renatoromao 6,762 on at
    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-in-portal/m-p/415039#M227

    You can follow this topic and wait for the answer 🙂

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,006

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics