When sending a request to remove a user from a group (see the example below), the requested operation fails with the error statement “Cannot remove the specified item because it was not found in the specified Collection.”
This error has one of the following causes:
- The <value> element of the <attr> element specifies a user account that is not a member of the group.
- The Distinguished Name fields, such as CN or OU, used in the distinguished name of the user account to be removed, have invalid spelling or case. The Distinguished Name fields must be in upper case. So the use of cn=Robert Smith instead of CN=Robert Smith generates this error.
Verify that the <value> element specifies the distinguished name of the user that is the group member. Make sure that the Distinguished Name fields are in upper case.
The following example illustrates how to create a request to remove user Robert Smith from the Sales group.
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<modifyRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
<attr name="member" xmlns="urn:oasis:names:tc:DSML:2:0:core">