/// <summary> /// Construction for MSI Login /// </summary> /// <param name="resourceType">MSI Resource Type</param> /// <param name="clientId">User Assigned Identity Client ID</param> /// <param name="resourceId">User Assigned Identity Resource ID</param> /// <param name="objectId">User Assigned Identity Object ID</param> public MSILoginInformation(MSIResourceType resourceType, string clientId = null, string resourceId = null, string objectId = null) { this.ResourceType = resourceType; this.UserAssignedIdentityClientId = clientId; this.UserAssignedIdentityResourceId = resourceId; this.UserAssignedIdentityObjectId = objectId; }
/// <summary> /// Creates a credentail object using token from local managed service identity endpoint. /// </summary> /// <param name="clientId">User Assigned Identity Client ID</param> /// <param name="resourceType">Resource Type for MSI Login Information</param> /// <param name="environment">The environment to authenticate to</param> /// <param name="tenantId">The tenant ID</param> /// <returns>an authenticated credentials object</returns> public AzureCredentials FromUserAssigedManagedServiceIdentity(string clientId, MSIResourceType resourceType, AzureEnvironment environment, string tenantId = null) { return(new AzureCredentials(new MSILoginInformation(resourceType, clientId), environment, tenantId)); }
public MSILoginInformation(MSIResourceType resourceType) { this.ResourceType = resourceType; }