Skip to main content

Notifications

Copilot Studio - Publish & Channel Management
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.
  • renatoromao Profile Picture
    renatoromao 6,819 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,819 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 🙂

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics