ADO.NET Provider for Microsoft SharePoint

Build 25.0.9539

DeleteUserFromRole

Removes a user from a specified SharePoint role. Helps maintain security by adjusting permissions as needed.

Stored Procedure-Specific Information

The DeleteUserFromRole stored procedure removes one or more users from a SharePoint role (permission level). The LoginName parameter accepts a comma-separated list of user login names, and the Role parameter specifies the role name.

To remove a single user from a role, enter:

EXEC DeleteUserFromRole LoginName = 'DOMAIN\username', Role = 'Custom Role';

To remove multiple users from a role, enter:

EXEC DeleteUserFromRole LoginName = 'DOMAIN\user1,DOMAIN\user2', Role = 'Custom Role';

Input

Name Type Required Description
LoginName String True A comma-separated list of login names for the users who should be removed from the specified role. Example: 'Domain\\user1,Domain\\user2'.
Role String True The name of the SharePoint role to unassign from the specified users. Example: 'Contributors', 'Site Owners', or 'Read-Only'.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the operation was successful. Returns 'true' if the users were successfully removed from the role, otherwise 'false'.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 25.0.9539