Sm_PolicyApi_GetAffiliateByName()

Gets an affiliate.
sm1252sp1
Gets an affiliate.
Type
Federation function
Syntax
int SM_EXTERN Sm_PolicyApi_GetAffiliateByName (
void*pSessionHandle,
const char*pszAffiliateOid,
const char*pszAffiliateName,
Sm_PolicyApi_Affiliate_t**ppstructAffiliate
);
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.
pszAffiliateName
I
A null-terminated string containing the name of an existing affiliate.
ppstruct
Affiliate
O
The address of a pointer to an affiliate structure.
Remarks
This function retrieves affiliate objects that are based on the artifact profile or the POST profile (see the Sm_PolicyApi_Affiliate_t field SAMLProfile). Retrieval of an affiliate object based on the POST profile requires an API version of at least SM_POLICY_API_VERSION_6_0_2. If an earlier version is involved, and the function specifies an affiliate object based on a POST profile, the request fails.
Returns
  • Sm_PolicyApi_Success. The affiliate was retrieved successfully.
  • Sm_PolicyApi_Failure. The affiliate was not retrieved 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 retrieve an affiliate.
  • Sm_PolicyApi_InvalidOID. The affiliate OID was not found.
  • Sm_PolicyApi_NotFound. The affiliate name was not found.