-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az rest does not support POSTing binary data #22810
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az ad(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az ad(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Related command
az rest
Is your feature request related to a problem? Please describe.
I want to upload a logo for an application registration. MS Graph requires this to be uploaded binary, but az rest Base64-encodes it. I tried
az rest --method put --headers ContentType=image/png --url https://graph.microsoft.com/v1.0/applications/0b1ec71d-0f88-a661-1ca7-104888888888/logo --body @image.pngDescribe the solution you'd like
az rest should support a parameter to read the body from a file binary, like
--body-file.Alternatively, enforce uploading the data as-is via a parameter (would also fix this: )
Describe alternatives you've considered
It is possible to upload a logo using other REST clients, like the .NET Graph Client.
az ad app updatedoes not offer any parameter to upload a logo.Additional context
This addition would also solve this use case: https://stackoverflow.com/questions/63413704/azure-cli-rest-issue-with-encoding-german-umlauts