Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Cannot convert the literal 'xxxxxx' to the expected type 'Edm.Binary' #23968

Closed
dawwa opened this issue Sep 22, 2022 · 3 comments
Closed
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Graph az ad question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@dawwa
Copy link

dawwa commented Sep 22, 2022

Related command

az ad app create --display-name "MyApp" --key-display-name Default --key-type Password --key-value "xxxxxx" --sign-in-audience AzureADMultipleOrgs

Describe the bug
Got the error of "ERROR: Cannot convert the literal 'xxxxxx' to the expected type 'Edm.Binary'."

Additional context
We were with the following command and it had been working fine previously, however seems recently this way is deprecated? and when I tried the new command, we face this issue.

az ad app create --display-name "MyApp" --credential-description Default --password "xxxxxx" --available-to-other-tenants true

Related KB: https://learn.microsoft.com/en-us/cli/azure/ad/app?view=azure-cli-latest#az-ad-app-create

@ghost ghost added Auto-Assign Auto assign by bot Graph az ad labels Sep 22, 2022
@ghost ghost assigned jiasli Sep 22, 2022
@ghost ghost added this to the Backlog milestone Sep 22, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Sep 22, 2022

@jiasli for awareness

@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 22, 2022
@jiasli
Copy link
Member

jiasli commented Sep 22, 2022

The Microsoft Graph migration is documented at https://learn.microsoft.com/en-us/cli/azure/microsoft-graph-migration

As described in the doc, az ad app create no longer has --password argument:

For az ad app create ... --key-value "xxxxxx", could you share several starting bytes of "xxxxxx" and the --debug log?

@jiasli
Copy link
Member

jiasli commented Sep 22, 2022

As discussed offline, for --key-value "xxxxxx", "xxxxxx" should be the public key of a certificate, not password.

To let Graph service generate a password, use az ad app credential reset.

@jiasli jiasli closed this as completed Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Graph az ad question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants