Sm_PolicyApi_AddGroup()

The function adds a new group object to the SiteMinder policy store. The attributes of the group are contained in the pStructGroup structure.
casso126
The function adds a new group object to the SiteMinder policy store. The attributes of the group are contained in the
pStructGroup
structure.
Groups of global objects are not supported.
The
pszDomainOid
parameter is required by a rule group or response group. An agent group does not require a domain OID because it is not a domain-based object.
If the group object exists and the
bUpdate
flag is true, the item is updated.
Type
Group function, global scope (agents), or domain scope (responses, rules).
Syntax
int SM_EXTERN Sm_PolicyApi_AddGroup (
void*pSessionHandle,
Sm_PolicyApi_Groups_tdwGroup,const char*pszDomainOid,Sm_PolicyApi_Group_t*pStructGroup,const boolbUpdate
);
Parameter
I/O
Description
pSession Handle
I
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session.
dwGroup
I
Indicates the type of group to be added.
pszDomainOid
I
A null-terminated string containing the name of an existing domain. Required parameter for rule or response group. (Global rule or response groups are not supported.)
pStructGroup
I
A pointer to a completely filled-in group structure.
bUpdate
I
A flag to indicate that if an existing object is found, it should be updated.
 Returns
  • Sm_PolicyApi_Success
    The addition was successful
  • Sm_PolicyApi_Failure
    The addition was not successful
  • 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 add a group
  • Sm_PolicyApi_InvalidOid
    The domain OID was not found (for a domain-based group)
  • Sm_PolicyApi_BadGroup
    The
    dwGroup
    parameter is not the rule, response, or agent group type