private static async Task <IAzureMediaServicesClient> InitializeAmsClient(ServicePrincipalAuth spAuth) { ClientCredential clientCredential = new ClientCredential(spAuth.AadClientId, spAuth.AadSecret); ServiceClientCredentials serviceCredential = await ApplicationTokenProvider.LoginSilentAsync(spAuth.AadTenantId, clientCredential, Helpers.GetActiveDirectoryServiceSettings(spAuth.AADSettings)); return(new AzureMediaServicesClient(spAuth.ArmEndpoint, serviceCredential) { SubscriptionId = spAuth.SubscriptionId }); }
public AppSettings(ServicePrincipalAuth source, ServicePrincipalAuth destination, Miscellaneous miscellaneous) { Source = source; Destination = destination; Miscellaneous = miscellaneous; }