I am trying to connect to my azure subscription , I have a code which allow me to get the Token
var authContext = new AuthenticationContext(string.Format
("https://login.windows.net/{0}", tenantId));
var credential = new ClientCredential(applicationId, password);
AuthenticationResult token = authContext.AcquireTokenAsync
("https://management.core.windows.net/", credential).Result;
if (token == null)
{
Console.WriteLine("Failed to obtain the token");
return;
}
from this step i don't know how to use ResourceManagementClient Class to get connected ...
Once you got the token, you can use it like this with a "ResourceManagementClient":
You can create your own "TokenCredentials" class which inherit From "ServiceClientCredentials" like this :