/// <summary> /// Imports from AD all users from the given group and associates them with /// given roles. /// </summary> /// <remarks> /// Required permissions: Users.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='importUsersParameters'> /// <para />Group - The name of the AD group whose users are to be /// imported. /// <para />RolesList - The collection of roles the imported users will /// be associated with. /// <para />OrganizationUnitIds - The collection of ids of the /// organization units the imported users will be associated with. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ImportUsersAsync(this IUsers operations, ImportUsersParameters importUsersParameters = default(ImportUsersParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.ImportUsersWithHttpMessagesAsync(importUsersParameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Imports from AD all users from the given group and associates them with /// given roles. /// </summary> /// <remarks> /// Required permissions: Users.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='importUsersParameters'> /// <para />Group - The name of the AD group whose users are to be /// imported. /// <para />RolesList - The collection of roles the imported users will /// be associated with. /// <para />OrganizationUnitIds - The collection of ids of the /// organization units the imported users will be associated with. /// </param> public static void ImportUsers(this IUsers operations, ImportUsersParameters importUsersParameters = default(ImportUsersParameters)) { operations.ImportUsersAsync(importUsersParameters).GetAwaiter().GetResult(); }