SharePoint - Remove User from Group

Declaration

<AMSHAREPOINT ACTIVITY="remove_user" ID="number" EMAIL="text" PROVIDER="text (options)" />

See Also

SharePoint - Get Roles | SharePoint - Get Sites | SharePoint - Get Users | SharePoint - Move File | SharePoint - Remove from Role | SharePoint - Remove List Item | SharePoint - Remove User from Group | SharePoint - Rename Folder | SharePoint - Update List | SharePoint - Update List Item | SharePoint - Update Role | SharePoint - Update Site | SharePoint - Upload File

Description

Removes a user from an existing group.

NOTE: This activity is only supported in SharePoint 2010 Server.

 

IMPORTANT: The SharePoint activities are performed using SharePoint Client Object Model/Web Services. Therefore, you must have SharePoint Server 2003/2007/2010 installed in order for these activities to work. Additionally, certain activities or parameters are only supported in SharePoint Server 2010. Support details are highlighted in the properties of relevant activities.

Practical Usage

See Description.

Parameters

Group Properties

Property

Type

Req'd

Default

Markup

Description

Group ID

Text

Yes

(Empty)

ID="theGroupID"

The group ID in which to remove the existing user from.

Login

Text

No

(Empty)

LOGIN="LoginName"

The login name of the user in which to remove.

Email

Text

No

(Empty)

EMAIL="user@company.com"

The email address of the user in which to remove.

UserID

Text

No

(Empty)

USERID="userID"

The user ID of the user in which to remove.

Server Properties

These properties allow you to create a custom session for this activity or link this activity to an existing session.

Property

Type

Req'd

Default

Markup

Description

Provide Settings

Text (options)

Yes

Custom

PROVIDER="session_based"

Indicates where this activity's server credentials should originate from. Different parameters become active  depending on the option selected. The available options are:

  • Custom (default) - Specifies that a custom set of credentials will be entered for this  activity. This option is normally selected when automating a single SharePoint activity.

  • Session Based - Specifies that credentials should derive from a session created in a previous Create Session step. This allows several activities to be linked to a specific session, eliminating redundancy. Multiple sessions can exist within a single task allowing several SharePoint operations to be automated simultaneously.

Session

Text

No

SharePoint

Session1

SESSION="mySession1"

The name of the session to associate this activity with. The default value is SharePointSession1. This parameter is active only if the Provide Settings parameter is set to Session Based.

NOTE: Use the End Session activity to end an active SharePoint session.

Version

Text (options)

Yes

SharePoint 2010

VERSION="SharePoint2010"

The SharePoint version to associate with this session. This parameter is active only if the Provide Settings parameter is set to Custom. The available options are:

  • SharePoint 2010 (default)

  • SharePoint 2007 and older

IMPORTANT: Certain SharePoint activities or parameters are only supported in SharePoint 2010. Support details are highlighted in the properties of relevant activities.    

Site

Text

Yes

(Empty)

SITE="http://myServer/tech"

The SharePoint site to associate with this session. This parameter only accepts entry of a top level site. Specification of a subsite (if applicable) can be entered in the properties of individual SharePoint activities. This parameter is active only if the Provide Settings parameter is set to Custom.

Authentication Type

Text (options)

No

Default

AUTHTYPE="Form"

The method of authentication to use. Certain parameters become active depending on which authentication method is selected. The available options vary depending on the SharePoint version.

 SharePoint 2010 available authentication types:

  • Default (default)

  • Basic

  • Form

  • Anonymous

SharePoint 2007 and older available authentication types:

  • Basic

  • Digest

  • Proprietary

  • None

  • NTLM (default)

This parameter is active only if the Provide Settings parameter is set to Custom.

Username

Text

Yes

(Empty)

USERNAME="theUserName"

A valid SharePoint username. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Password

Text

Yes

(Empty)

PASSWORD="encryptedText"

A valid  SharePoint password. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Domain

Text

Yes

(Empty)

DOMAIN="myServer"

The domain that the username (specified in the Username parameter) belongs to. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Certificate

Text

No

(Empty)

CERTIFICATE="C:\Temp\file.cer"

The (DER encoded) certificate to use for SharePoint authentication. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Ignore invalid certificate

Yes/No

No

No

IGNOREINVALIDCERTIFICATE="yes"

If set to YES, specifies that invalid server certificates that are detected will be automatically ignored. Set to NO by default. This parameter is active only if the Certificate parameter is set to YES.

Timeout (seconds)

Number

No

600

TIMEOUT="500"

The total number of seconds allowed to connect to the SharePoint server, otherwise a time out error is generated. The default value is 600 seconds. This parameter is active only if Provide Settings parameter is set to Custom.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Remove user "" from group with id "123456". Session is "SharePointSession1".

 

<AMSHAREPOINT ACTIVITY="remove_user" ID="123456" EMAIL="user@company.com" PROVIDER="session_based" />

 

↑ Top of Page