The SiteMinder Policy Server calls SmDirGetUserGroups so that you can retrieve the groups to which a user belongs.
SiteMinder calls SmDirFreeStringArray() to free the lpszGroups array.
Syntax
int SM_EXTERN SmDirGetUserGroups ( const Sm_Api_Context_t* lpApiContext, void* pHandle, void* pInstanceHandle, const char* lpszUserDN, const int bRecursive, char*** lpszGroups );
Parameter |
I/O |
Description |
---|---|---|
lpApiContext |
I |
Pointer to the API context structure. |
pHandle |
I |
The address of the pointer returned by SmDirInit(). |
pInstanceHandle |
I |
The address of a pointer to the user instance handle. |
lpszUserDN |
I |
Buffer containing the user DN. |
bRecursive |
I |
A value specifying whether the custom directory supports recursion (for example, nested groups). The value 1 indicates recursion support; 0 indicates no support. If your custom directory supports recursion, you must search down any hierarchy of groups to find the user. Suppose that the value of the User DN is Bill Collector. Bill Collector may be in a group called AR, and AR may be in a group called Accounting. |
lpszGroups |
O |
A list of groups associated with lpszUserDN. |
Returns
Returns 0 if successful or -1 if not successful.
Copyright © 2010 CA. All rights reserved. | Email CA about this topic |