Azure-Samples / compute-python-msi-vm

This sample demonstrates how to create Azure virtual machine with Managed Service Identity Extension using a Python client
MIT License
5 stars 6 forks source link

it is possible to add the password during the SP creation? #5

Open Sispheor opened 5 years ago

Sispheor commented 5 years ago

I can't find in the doc if there is a flag to provide the password of the created SP.

I see that we get a client_secret_url as answer. Should I do a GET on this URL? What do I need to pass then as payload? I want to create a dedicated service principal that I can use then to create an AKS cluster. The template require the client secret.

Thanks a lot.

lmazuel commented 5 years ago

@yugangw-msft ?

yugangw-msft commented 5 years ago

The Python SDK type to use is PasswordCredential. For sample code, check out how CLI does. The related command is az ad sp create-for-rbac