Refresh

Reloads the User object data from the data in Active Directory.

Syntax

void Refresh()

Discussion

This method refreshes the user information in the cached object to ensure it is synchronized with the latest information in Active Directory.

Exceptions

Refresh throws a COMException if an LDAP error occurs. LDAP errors can occur if the connection to the LDAP server fails, the connection times out, invalid credentials are presented, or there are other problems communicating with Active Directory.

Example

The following code sample illustrates using Refresh in a script:

...  
'Specify the zone you want to work with  
set objZone =
cims.GetZoneByPath("LDAP://CN=corporate,CN=zones,CN=centrify,CN=program
data,DC=sierra,DC=com")  
'Get the user object  
set objUser = cims.GetUserByPath("LDAP://CN=pat.hu,CN=Users,DC=ajax,DC=org")  
'Get the UNIX profile for the user  
profile = objUser.UnixProfiles  
'Enable the user’s UNIX profile  
profile.UnixEnabled = True  
'Reload the user object  
objUser.Refresh  
...