Create a User Assgined Managed Identity
With the new Azure SDK Management Libraries I have had the requirement to create a user-assgined Identity. Unfortunately there is no easy way in the new SDK to do so. So I created my own little helper method.
Nuget Packages
Azure.ResourceManager.Resources Azure.Identity Code
async Task<UserAssignedIdentity> CreateOrUpdateUserAssignedIdentity(string identityName, string resourceGroup) { var armClient = new Azure.ResourceManager.ArmClient(new AzureCliCredential()); var sub = await armClient.GetDefaultSubscriptionAsync(); var rg = (await sub.GetResourceGroups().GetAsync(resourceGroup)).Value; var umi = new GenericResourceData(AzureLocation.
[Read More]