I have the following code:
var client = new WebSiteManagementClient(creds);
var data = client.WebSites.Get("eastuswebspace", "some-site", new WebSiteGetParameters());
I need to generate credentials, I am an admin with full access. Only one App accessing my data and need to generate a TokenCloudCredentials.
I tried registering an App but getting a "forbidden" error after successfully generating the token. Is there a simplest way of doing this (like Github, generate a token and it's done?).
Thanks.
I managed to make it work with the following snippet. It just needs the certificate. Check if that works for you. You will need the Azure publishing settings file (thumbprint from that).
To generate a Token Credentials, you need to create a certificate and upload it on Azure.
First, you can create a certificate using this command line :
Then, it's necessary to upload it on Azure by following this process. Once it's uploaded, you can get the publishsettings file to obtain the certificate management thumbprint with this power shell command line :
The following screen shot shows where to find the certificate management thumbprint in the publishprofile :
Then you can use the code proposed by Alex Belotserkovskiy to get authenticated with the Azure Management SDK.
Here is a complete blog post which shows all steps.