Sm_PolicyApi_AddSAMLServiceProvider()

Adds a new SAML 2.0 Service Provider object or modifies an existing one.
sm1252sp1
Adds a new SAML 2.0 Service Provider object or modifies an existing one.
If a Service Provider cannot be created, any associated objects created in the policy store during the attempt will be rolled back.
Type
SAML 2.0 Configuration function, domain scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddSAMLServiceProvider
(
void*pSessionHandle,
Sm_PolicyApi_SAMLSP_t*pstructSAMLSP,
const boolbUpdate,
char**pszErrMsg
);
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.
pstructSAMLSP
I
A pointer to a completed Service Provider structure.
bUpdate
I
Specifies whether an update operation should be performed on an existing object.
pszErrMsg
O
String containing an error message if the Service Provider is not added or updated successfully.
The Policy Management API allocates memory for this parameter dynamically. It is the responsibility of the custom application to free it using a call to Sm_PolicyApi_FreeString().
If Sm_PolicyApi_MissingProperty or Sm_PolicyApi_InvalidProp are returned, this field contains the name of the property that is missing or invalid.
Returns
  • Sm_PolicyApi_Success. The Service Provider operation was successful.
  • Sm_PolicyApi_Failure. The Service Provider operation was not successful.
  • Sm_PolicyApi_InvalidProp. A specified property is invalid. The property name is returned in
    pszErrMsg
    .
  • Sm_PolicyApi_MissingProperty. A required property was not specified. The property name is returned in
    pszErrMsg
    .
  • 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 a Service Provider.
  • Sm_PolicyApi_DomainNotFound. The affiliate domain OID was not found.
  • Sm_PolicyApi_DomainNotAffiliate. The domain is not an affiliate domain.
  • Sm_PolicyApi_InsufficientSPData. Required properties for configuring the Service Provider were missing.