Sm_PolicyApi_AddAffiliate()

The function creates an affiliate object or updates an existing affiliate object. This function retrieves the PropertyCollection object that is based on the AffiliateDomain OID.
casso126
The function creates an affiliate object or updates an existing affiliate object. This function retrieves the PropertyCollection object that is based on the AffiliateDomain OID.
Type
Federation function
Syntax
int SM_EXTERN Sm_PolicyApi_AddAffiliate (
void*pSessionHandle,
Sm_PolicyApi_Affiliate_t*pstructAffiliate,
const boolbUpdate
);
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.
pstructAffiliate
I
A pointer to a completely filled-in affiliate structure.
bUpdate
I
A flag to indicate that if an existing object is found, it should be updated.
Remarks
This function creates affiliate objects that are based on the artifact profile or the POST profile (see the Sm_PolicyApi_Affiliate_t field SAMLProfile). Creating an affiliate object that is based on the POST profile requires an API version of at least SM_POLICY_API_VERSION_6_0_2. The POST profile request is ignored (with any POST-specific fields in Sm_PolicyApi_Affiliate_t) if an earlier version is involved. An attempt is made to create an affiliate object that is based on the artifact profile.
Returns
  • Sm_PolicyApi_Success
    The affiliate was created successfully
  • Sm_PolicyApi_Failure
    The affiliate was not created successfully
  • Sm_PolicyApi_InvalidHandle
    No valid initialization before this call
  • Sm_PolicyApi_NoSession
    No valid administrator session
  • Sm_PolicyApi_NoPrivilege
    The administrator does not have the permission to create an affiliate
  • Sm_PolicyApi_DomainNotFound
    The affiliate domain OID was not found
  • Sm_PolicyApi_DomainNotAffiliate
    The domain is not an affiliate domain