3.1.4.4.2.1 AddMembership

The AddMembership element is the body of the request WSDL message for the AddMembership WSDL operation.

 <s:element name="AddMembership">
   <s:complexType>
     <s:sequence>
       <s:element name="accountName" type="s:string" minOccurs="0" maxOccurs="1"/>
       <s:element minOccurs="0" maxOccurs="1" name="membershipInfo" type="tns:MembershipData"/>
       <s:element minOccurs="0" maxOccurs="1" name="group" type="s:string"/>
       <s:element name="privacy" type="tns:Privacy"/>
     </s:sequence>
   </s:complexType>
 </s:element>

accountName: A string that specifies the login name of the user profile to return the elements for. This value MUST be less than or equal to 400 characters in length. The protocol server MUST treat accountName in a case insensitive manner for retrieval of the user profile.

If accountName is not specified or does not have a value and there is not an existing user profile for the current user, then a new user profile MAY<7> be created which represents the current user.

If accountName is not specified or does not have a value and there is an existing user profile for the current user, then the protocol server MUST return elements for that user profile.

If accountName is specified and does not match the login name of an existing user profile, the protocol server MUST send a SOAP fault message.

membershipInfo: Identifies the member group of the membership that will be added to the user profile. The protocol server MUST only use the MemberGroup element of the MembershipData (section 2.2.4.13) element and MUST ignore all other elements.

If the membershipInfo element specified does not correspond to an existing member group, the protocol server MUST send a SOAP fault message.

If the user profile already contains a membership to this member group, the protocol server MUST send a SOAP fault message.

group: A string that refers to a group (2). This value MUST be less than or equal to 50 characters.

privacy: A value that MUST correspond to a value in the Privacy (section 2.2.5.4) enumeration. This value specifies the set of users who can view this membership. This value MUST NOT be "NotSet".