joergjo / contosoads-containerapp

Contoso Ads Azure Container Apps demo application
MIT License
7 stars 3 forks source link

Fehler beim Anlegen eines Service Principals #5

Closed hsirtl closed 1 year ago

hsirtl commented 2 years ago

Die Zeile

az ad sp create-for-rbac --sdk-auth --name ContosoAds-CICD --role contributor --scopes "/subscriptions/$subscription_id"

zeigt zumindest bei mir (kann auch einer etwas instabilen Ubuntu-distro liegen) die Warnung

"Option '--sdk-auth' has been deprecated and will be removed in a future release."

an und gibt zudem nicht das benötigte JSON aus.

Erst wenn ich es ohne den SDK-Parameter mache, funktioniert's mit der JSON-Ausgabe:


ubscription_id"```
joergjo commented 2 years ago

--sdk-auth is actually deprecated, but is still available to support GitHub Actions (see https://github.com/Azure/azure-cli/pull/21219). The output of az ad sp create-for-rbac is different from --sdk-auth, so I'm surprised that this has worked for -- unless GH actions now support the new condensed JSON output.

joergjo commented 2 years ago

I've added a note that the deprecation warning is to be expected right now.

@hsirtl Are you saying that the output of az ad sp create without --sdk-auth worked for you in GH Actions?

hsirtl commented 2 years ago

az ad sp create gave all the info needed for the secrets (copying single values to the respective fields in the secrets template, e.g. appID -> clientID). It's fine to have the deprecated warning.