Hosted Active Directory::UserIsSelf
If it is supplied a user object path, this procedure returns an isSelf value of 0 or 1 indicating whether the user summiting the request == the supplied user object.
This procedure is intended to support a common requirement of control panels and self service portals, which is the ability to determine if an action is being performed on the logged on users object. Examples include whether to display a change password UI or a reset password UI, or whether to allow an admin user to delete themselves or not.
Arguments
Input schema
Input Arguments | Required | Description |
---|---|---|
<user> |
Yes |
The Lightweight Directory Access Protocol (LDAP) path or UPN value |
<preferredDomainController> |
Yes |
The name of the preferred Domain Controller |
Output schema
Output Arguments | Description |
---|---|
<isSelf> |
Allowed values are 0 or 1 |
Remarks
Security
Delegation is handled through Active Directory ACL'ing no explicit tests required.
Error Handling
Any exceptions in identifying either the user object or logged on user should be bubbled up from the underlying APIs as there could be many variations.
Sample Code
Example XML Request
<request>
<procedure>
<execute namespace="Hosted Active Directory" procedure="UserIsSelf" impersonate="2">
<executeData>
<user>kiki@fabrikam.com</user>
<preferredDomainController>ad01.fabrikam.com</preferredDomainController>
</executeData>
<after source="executeData" destination="data" mode="merge" />
</execute>
</procedure>
</request>
Example XML Response
<response>
<data>
<user>kiki@fabrikam.com</user>
<preferredDomainController>ad01.fabrikam.com</preferredDomainController>
<isSelf>0</isSelf>
</data>
</response>
Applies To
Hosted Active Directory Namespace API for:
- Hosted Messaging and Collaboration version 4.5