Programming Guides › Programming Guide for C › Policy Management API › Function Declarations for the Policy Management API › Sm_PolicyApi_AddWSFEDResourcePartner()
Sm_PolicyApi_AddWSFEDResourcePartner()
Creates a new or update an existing WS-Federation Resource Partner object. Validation of properties (values and dependencies on other properties) is performed.
Syntax
int SM_EXTERN Sm_PolicyApi_AddWSFEDResourcePartner (
void* pSessionHandle,
Sm_PolicyApi_WSFEDResourcePartner_t* structServiceProvider,
const bool bUpdate,
char **pszErrMsg
);
Parameters
- pSessionHandle
[in] A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session.
- pstructServiceProvider
[in] A pointer to a completely filled-in WS-Federation Resource Partner structure.
- bUpdate
[in] A flag to indicate that if an existing object is found, it should be updated.
- pszErrMsg
[out] When a call to this function returns a value of Sm_PolicyApi_SAML_UnknownProperty, Sm_PolicyApi_MissingProperty, or Sm_PolicyApi_InvalidProp, this variable contains the name of the property which produced the error. The memory allocated for this variable must be freed by the caller.
Return Values
- Sm_PolicyApi_Success. The Resource Partner was created successfully.
- Sm_PolicyApi_Failure. The Resource Partner was not created 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 create an affiliate.
- Sm_PolicyApi_DomainNotFound. The affiliate domain OID was not found.
- Sm_PolicyApi_DomainNotAffiliate. The domain is not an affiliate domain.
- Sm_PolicyApi_InsufficientRPData. Required properties for configuring the Resource Partner were missing.
- Sm_PolicyApi_WSFED_UnknownProperty. An unknown property name was provided.
- Sm_PolicyApi_WSFEDRP_AssertionConsumerDefaultMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_AuthenticationURLMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_DomainOidMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_APIDMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_NameMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_NameIdFormatMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_NameIdTypeMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_NameIdStaticMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_NameIdAttrNameMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_NameIdDNSpecMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_ProviderIdMissing. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_ProviderIdNotUnique. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_UnSupportedSAMLVersion. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_WSFEDRP_UnknownProperty. The property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_MissingProperty. A property which is required, potentially due to a dependency, was not provided.
- Sm_PolicyApi_InvalidProp.The value for a provided property is invalid.
Remarks
In the event that a Resource Partner cannot be created, any objects created in the policy store must be rolled back. In addition, the prefix string wsfed: will be used for the Name property to differentiate between affiliate: and samlsp:.