/// <summary> /// Associates a group of users with and dissociates another group of users /// from the given role. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Users or Users.Write. /// /// Required permissions: Roles.Edit and Users.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The role id. /// </param> /// <param name='body'> /// <para />addedUserIds - The id of the users to be associated with the /// role. /// <para />removedUserIds - The id of the users to be dissociated from /// the role. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task SetUsersByIdAsync(this IRoles operations, int key, RolesSetUsersParameters body = default(RolesSetUsersParameters), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.SetUsersByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Associates a group of users with and dissociates another group of users /// from the given role. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Users or Users.Write. /// /// Required permissions: Roles.Edit and Users.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The role id. /// </param> /// <param name='body'> /// <para />addedUserIds - The id of the users to be associated with the /// role. /// <para />removedUserIds - The id of the users to be dissociated from /// the role. /// </param> public static void SetUsersById(this IRoles operations, int key, RolesSetUsersParameters body = default(RolesSetUsersParameters)) { operations.SetUsersByIdAsync(key, body).GetAwaiter().GetResult(); }