question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`az login` opens web browser to _AADSTS900144: The request body must contain the following parameter: 'scope'._

See original GitHub issue

Describe the bug

Command Name az login

Errors: Web browser opens & displays

AADSTS900144: The request body must contain the following parameter: 'scope'.

instead of a login prompt. This wasn’t required months ago. Not sure what to include in --scope parameter (nothing seems to work).

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az login

Expected Behavior

Show login prompt if necessary to allow login as before.

Environment Summary

Linux-4.4.0-19041-Microsoft-x86_64-with-debian-11.0, Ubuntu 21.10
Python 3.6.10
Installer: DEB

azure-cli 2.30.0 *

Extensions:
azure-devops 0.22.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jiaslicommented, Feb 28, 2022

Could you please share

  • The output of az cloud show
  • The URL in the browser when it launches image
0reactions
lmmarsanocommented, Mar 3, 2022

@jiasli WSL 1.

PS C:\Users\LOM0227> wsl.exe --status
Default Distribution: Ubuntu-20.04
Default Version: 2

Windows Subsystem for Linux was last updated on 11/30/2021
The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
For more information please visit https://aka.ms/wsl2kernel.

Kernel version: 5.10.60.1
PS C:\Users\LOM0227> wsl.exe -l
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
PS C:\Users\LOM0227> wsl.exe lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:        21.10
Codename:       impish
PS C:\Users\LOM0227> wsl.exe update-alternatives --query www-browser
Name: www-browser
Link: /usr/bin/www-browser
Status: auto
Best: /usr/local/bin/www
Value: /usr/local/bin/www

Alternative: /usr/bin/wslview
Priority: 30

Alternative: /usr/local/bin/www
Priority: 40
PS C:\Users\LOM0227> wsl.exe cat /usr/local/bin/www
#!/usr/bin/env bash
if [[ \ $* == *\ http?(s)://* ]]
then exec >/dev/null 2>&1 cmd.exe /c start "$@"
else exec /usr/bin/${0##*/} "$@"
fi

Not installed in VM: it launches native Windows web browser if any argument is an http URL. Ah, I see: funny shell escape rules for Windows interop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AADSTS900144: The request body must contain the following ...
AADSTS900144 : The request body must contain the following parameter: 'scope'. It failed on https://login.microsoftonline.com/{Directory (tenant) ...
Read more >
Error when using OAuth with Azure AD - One Identity Support
AADSTS900144 : The request body must contain the following parameter: 'client_id'." Resolution. 1. Use "client_secret_basic" instead of " ...
Read more >
The request body must contain the following parameter: 'scope'.
Now I tried to manage to configure Oauth however I'm getting below error while testing API from Developer portal. AADSTS900144: The request body...
Read more >
The Request Body Must Contain The Following Parameter
This error could be seen when there is a mismatch in the scope defined at the Authorization Server end and the scope used...
Read more >
Log in to the Azure CLI - IBM
Open https://microsoft.com/devicelogin in a browser and enter the code that you ... Microsoft Microsoft Azure Cross-platform Command Line Interface You have ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found