azure-cli: az ad sp create-for-rbac fails

Describe the bug Running the following:

az ad sp create-for-rbac

… results in the following error:

Url contains invalid URI Scheme paramName: WwwHomepage, paramValue: http://azure-cli-2018-09-19-23-01-58, objectType: Microsoft.Online.DirectoryServices.Application

To Reproduce Using version 2.0.45 run az ad sp create-for-rbac.

Expected behavior A service principal is created.

Environment summary CLI version 2.0.45 Ubuntu 18.04 LTS Server (in an Azure VM) Running in bash Installed with apt.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Seeing the same thing. Looks to me like an upstream change has made http:// an invalid home page URL scheme.

I have a local fix.

The official release with the fix will be out in 2 weeks. For now, 2 options below. Please note, not all tenants enforce the https, so likely the tenant of your personal subscription still work.

  1. use docker docker run -v ${HOME}:/root -it azuresdk/azure-cli-python:dev
  2. use generic commands for now, e.g.
az ad app create --display-name "app123"  --end-date 2020-12-31 --identifier-uris "http://app123" --key-type password --password "verySecret"

(copy the appID from the result) 

az ad sp create --id <the appID>

(wait for a minute or so)

az role assignment create --assignee <the appID> --role contributor --scope /subscriptions/<your subscription id>

Hi folks here, I chatted with AAD graph team, and confirmed that rejecting http based homepage uri is not a correct service behavior, which means we likely experienced a transient server error. I tried several times just now and can’t reproduce this error any more. So I would appreciate anyone here can also try again. If see the same error, please share with me the verbose trace (using --debug) for me to open an internal support ticket right away. I can be reached at yugangw at microsoft dot com

Same issue here … It is blocking us from doing an important experiment

Same issue here on 2.0.44 and 2.0.45