Is it possible to mange an azure account within code? Like
var ac = new AzureAccount(name, password);
ac.CreateStorageAccount(name);
ac.CreateCoAdmin(name);
...
I already know about the Azure cmdlets, but that doesn’t help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll need to look at the Service Management API. There is an operation that allows you to create a storage account for example (comes with a C# example): Create Storage Account.
Adding a co-admin on the other hand won’t be that simple. I believe there’s support in the Service Management API to manage co-admins. If this is really important to you you can try to look at how the portal does it. You’ll see that it executes 2 requests to add a co-admin to a subscription:
This isn’t documented and before even calling these services you’ll need to manage authentication first.