List targets available for provisioning with |
This example illustrates how to retrieve the targets available for provisioning with .
To do this, performs the listTargets operation.
The request message includes the following XML elements:
The response lists the supported targets, including the schema definitions for each target and the set of capabilities that supports for each target. The contents of the <listTargetsResponse> element conform to the OASIS SPML v2 specification. |
Create new user
Create new user (using direct access mode) |
These examples illustrate how to create a user account object in two operation modes.
To create a new object, performs the add operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <addRequest> element asks to create a new object.
-
The <containerID> element specifies the distinguished name of the container in which to create the new object.
-
The <data> element encloses the elements that specify attribute values on the new object. Thus, in accordance with the objectClass attribute value, is requested to create a user account.
The operation response indicates whether the user account is successfully created.
NOTE: To provision a user account in direct access mode, perform the following steps:
-
Create a request to create a new user account, as described above.
-
Create a request to set the user password (see Set user password in Password capability samples.
-
Create a request to enable the user account (see Resume user account in Suspend capability samples). |
Create new user (approval aware) |
This example illustrates how to create a user account if this operation is subject to approval by designated approvers. For more information about approval activities and workflows, see Workflows.
If the creation of user is subject to approval, to perform the operation, your SPML request must contain the AllowApproval built-in control. For information about how to use controls in SPML requests, see Active Roles controls supported by SPML Provider.
To create a new object, performs the add operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <addRequest> element asks to create a new object.
-
The <controls> element includes the child element <control> that sets the AllowApproval control to the Confirm value.
-
The <controlsForOutput> element includes the child element <control>, which specifies that the OperationStatus control will be returned with the SPML response.
-
The <containerID> element specifies the distinguished name of the container in which to create the new object.
-
The <data> element encloses the elements that specify attribute values on the new object. Thus, in accordance with the objectClass attribute value, is requested to create a user account.
The operation response contains the OperationStatus control value that indicates the creation operation status. For example, if the user creation operation is subject to approval, the OperationStatus control returns the Pending value. In this case, the operation is waiting for approval by designated approvers. For more information about possible values of the OperationStatus control, see the Active Roles SDK documentation. |
Create a user whose logon name is not in compliance with Active Roles policies |
This example illustrates an attempt to create a new user account whose logon name does not conform to the Active Roles policies.
Because the user logon name does not conform to the Active Roles policies, the creation operation fails and the operation response includes an error message returned by Active Roles. For example, an attempt to set the sAMAccountName attribute to a string of more than 20 characters causes the user creation operation to fail, with the response containing a message that provides some details on the error condition. |
Create new group |
This example illustrates how to create the group object SPMLGroup in the mycompany.com domain.
To create a new object, performs the add operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <addRequest> element asks to create a new object.
-
The <psoID> element specifies the distinguished name of the object to be created.
-
The <data> element encloses the elements that specify attribute values on the new object. Thus, in accordance with the objectClass attribute value, is requested to create a group object. |
Modify user attributes |
This example illustrates how to modify the description attribute of the John Smith user object in the mycompany.com domain.
To modify the object attribute, performs the modify operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <modifyRequest> element asks to make changes to a specified object.
-
The <psoID> element specifies the distinguished name of the user account to be modified.
-
The <modification> element specifies the type of change as replace, causing the new values to replace the existing attribute values.
-
The <data> element encloses the elements that specify the new attribute values. |
Modify Shared mailbox user permissions |
Modify or replace the edsaUserMailboxSecurityDescriptorSddl attribute of the Shared mailbox object.
To modify the object attribute, performs the modify operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <modifyRequest> element asks to make changes to a specified object.
-
The <psoID> element specifies the distinguished name of the user account to be modified.
-
The <modification> element specifies the type of change as replace, causing the new values to replace the existing attribute values.
-
The <data> element encloses the elements that specify the new attribute values, in SDDL format along with the SID of the user specified.
For an example, see Sample SPML Provider request to modify shared mailbox user permissions. |
Add user to group |
This example illustrates how to add the John Smith user account to the SPMLGroup group object in the mycompany.com domain.
To do this, performs the modify operation.
-
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <modifyRequest> element asks to make changes to a specified object.
-
The <psoID> element specifies the distinguished name of the group object to be modified.
-
The <modification> element specifies the type of change as add, causing the new values to be appended to the existing attribute values.
-
The <data> element encloses the elements that specify the distinguished name of the user account to be appended to the existing values of the member attribute. |
Look up user attributes |
This example illustrates how to get the XML representation of the John Smith user account in the mycompany.com domain.
To get the XML representation of an object, performs the lookup operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <lookupRequest> element asks to return the XML document that represents a specified object.
-
The <psoID> element specifies the distinguished name of the object.
The response contains the object identifier, the XML representation of the object and its attributes, and information about capabilities that are supported on the object (the capability-specific data that is associated with the object). |
Delete user |
This example illustrates how to delete the John Smith user account.
To do this, performs the delete operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <deleteRequest> element asks to delete a specified object.
-
The <psoID> element specifies the distinguished name of the user account to delete. |
Delete group |
This example illustrates how to delete the SPMLGroup group object in the mycompany.com domain.
To do this, performs the delete operation.
The request message includes the following XML elements:
-
The <soap:Envelope> and <soap:Body> SOAP elements enclose the SPML payload.
-
The <deleteRequest> element asks to delete a specified object.
-
The <psoID> element specifies the distinguished name of the group object to delete. |