Example #1
0
        private static async Task ProcessAllSubscriptions(ILogger log, CancellationToken ct)
        {
            string msiArmTokenString = await GetCredentialAsync(resource : "https://management.core.windows.net/");

            var subscriptionClient = new SubscriptionClient(credentials: new TokenCloudCredentials(msiArmTokenString));
            await subscriptionClient.IterateSubscriptions(ct,
                                                          subscription => ProcessSubscriptionAsync(
                                                              subscription, msiArmTokenString, log, ct));
        }