Sm_PolicyApi_CreateUserDir()

Contents
casso126
Contents
Creates a new
CA Single Sign-On
user directory object at global scope. The attributes of the user directory are contained in the
pstructUserDir
structure.
If the user directory object exists and the
bUpdate
flag is true, the item is updated.
Type
User directory function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_CreateUserDir (
void*pSessionHandle,
Sm_PolicyApi_UserDir_t*pstructUserDir,
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.
pstructUserDir
I
A pointer to a completely filled-in user directory structure.
bUpdate
I
A flag to indicate that if an existing object is found, it should be updated.
SM_PolicyAPI_UserDir_t Field Usage
The following table shows the SM_PolicyAPI_UserDir_t field that Sm_PolicyApi_CreateUserDir() uses for different types of user directories:
Field
User Directory Type
ODBC
LDAP
WinNT
Custom
pszOid
Object Identifier of the user directory being updated
X
X
X
X
pszName
Required field.
X
X
X
X
pszDesc
X
X
X
X
pszNamespace
Required field.
ODBC
LDAP
WinNT
Custom
pszServer
Required field.
ODBC data source
IP address
NT Domain name
Name of shared library
pszODBCQuerySchemeOid
Required field.
X
pszSearchRoot
X
parameter string
pszUserLookupStart
X
pszUserLookupEnd
X
bRequireCredentials
X
X
X
X
pszUsername
Required field if
bRequireCredentials
is true.
X
X
X
X
pszPassword
Required field if
bRequireCredentials
is true.
X
X
X
X
nSearchResults
X
Max results
nSearchScope
X
nSearchTimeout
X
Max time out
bSecureConnection
X
X
pszDisabledAttr
X
X
(Varies)
pszUniversalIDAttr
X
X
X
(Varies)
pszAnonymousId
X
(Varies)
pszPasswordData
X
X
(Varies)
pszPasswordAttribute
X
X
(Varies)
pszEmailAddressAttr
pszChallengeRespAttr
X
(Varies)
With custom directories, fields indicated by the word
varies
may or may not apply to the user directory object being created.
Returns
  • Sm_PolicyApi_Success. The user directory was created successfully.
  • Sm_PolicyApi_Failure. The user directory was not created successfully.
  • Sm_PolicyApi_NoSession. There is no valid administrator session.
  • Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
  • Sm_PolicyApi_NoPrivilege. The administrator does not have the privilege to create a user directory.
  • Sm_PolicyApi_InvalidOid:
    • A user directory type with the specified OID was not found.
    • A user directory OID cannot be found. This happens when this function is called with bUpdate set to true and
      pszOid
      holds the OID of the user directory that is being updated.
    • You are creating an ODBC user directory and the OCBC Query Scheme OID was not found.
  • Sm_PolicyApi_NotUnique. A user directory of the same name exists.
  • Sm_PolicyApi_MissingProperty. One of the required fields is not set.