Exemple #1
0
 /// <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'>
 /// &lt;para /&gt;Group - The name of the AD group whose users are to be
 /// imported.
 /// &lt;para /&gt;RolesList - The collection of roles the imported users will
 /// be associated with.
 /// &lt;para /&gt;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();
 }
Exemple #2
0
 /// <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'>
 /// &lt;para /&gt;Group - The name of the AD group whose users are to be
 /// imported.
 /// &lt;para /&gt;RolesList - The collection of roles the imported users will
 /// be associated with.
 /// &lt;para /&gt;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();
 }