Sm_PolicyApi_AddUsersToAffiliate()

Adds a user directory entry to an affiliate.
casso10
Adds a user directory entry to an affiliate.
Type
Federation function
Syntax
int SM_EXTERN Sm_PolicyApi_AddUsersToAffiliate (
void*pSessionHandle,
const char*pszAffiliateOid,
Sm_PolicyApi_User_t*pStructUsers,
intiPolicyFlags);
Parameter
I/O
Description
pSessionHandle
I
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session.
pszAffiliateOid
I
A null-terminated string containing the object identifier of an existing affiliate.
pStructUsers
I
Pointer to a Sm_PolicyApi_User_t structure containing information about the user directory.
iPolicyFlags
I
A bit field that indicates whether the policy includes or excludes a user and whether the policy should be applied recursively. The bit definitions are listed in Figure21 on page 112.
Returns
  • Sm_PolicyApi_Success. The user was added was successful.
  • Sm_PolicyApi_Failure. The user was not added successfully.
  • Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
  • Sm_PolicyApi_NoSession. There is no valid administrator session.
  • Sm_PolicyApi_NoPrivilege. The administrator does not have the privilege to add a user.
  • Sm_PolicyApi_InvalidOid: The affiliate OID was not found.
  • Sm_PolicyApi_DuplicateEntry. The user is already part of the affiliate.