public async Task Prepare(IMigrationContext context) { this.context = context; this.graphClient = context.TargetClient.Connection.GetClient <GraphHttpClient>(); this.licensingHttpClient = context.TargetClient.Connection.GetClient <LicensingHttpClient>(); this.identityHttpClient = context.TargetClient.Connection.GetClient <IdentityHttpClient>(); }
private static void CreateAuthConnection(string VssAccountUrl) { // Create a connection to the specified account. // If you change the false to true, your credentials will be saved. var creds = new VssClientCredentials(true); vssConnection = new VssConnection(new Uri(VssAccountUrl), creds); // We need the clients for two services: Licensing and Identity licensingClient = vssConnection.GetClient <LicensingHttpClient>(); identityClient = vssConnection.GetClient <IdentityHttpClient>(); }