Microsoft Identity Integration Server 2003 Developer Reference |
The MIIS_PasswordChangeHistorySource class represents a history entry of each password change request from the originating connected data source. To use this class, you must be logged on as a member of either the MIISBrowse or the MIISAdmins security group.
The following syntax is simplified from MOF code and includes all inherited properties.
class MIIS_PasswordChangeHistorySource { String CsGuid; String DN; String GUID; String MaGuid; String MIISReceiveTime; String ReferenceGuid; String ReturnCode; String SourceChangeTime; String SourceServer; };
The MIIS_PasswordChangeHistorySource class defines the following method.
Method | Description |
---|---|
EventDetails | Returns the details, in an XML format, of a history entry for each password change request sent from the originating connected data source to the MIIS Server in XML format. |
The MIIS_PasswordChangeHistorySource class has the following properties.
Gets the connector space globally unique identifier (GUID) of the object.
Gets the distinguished name of the object.
Gets the tracking GUID that is used to identify the password change request. This value is assigned by the MIIS server to track the password change request.
Gets the globally unique identifier (GUID) of the management agent that receives the password change request.
Gets the date and time in Coordinated Universal Time that the password change was received by the MIIS server.
Gets the reference GUID assigned by the Password Change Notification Service (PCNS) in the domain controller of the password change request.
Gets the results of the password change request.
Gets the date and time in Coordinated Universal Time that the password was changed on the source server.
Gets the name of the source server that changed the password.
The class supports the following restricted set of queries:
Set changeHistories = Service.ExecQuery("Select *
from MIIS_PasswordChangeHistorySource WHERE CsGuid = '" &
MIIS_CSObject.Guid & "')"
.Set changeHistories =
Service.ExecQuery("Select * from MIIS_PasswordChangeHistorySource
WHERE MIISReceiveTime > '2004-10-14 03:25:07.221'")
Note You cannot search for a history entry that occurred at a specified time.
Set changeHistories =
Service.ExecQuery("Select * from MIIS_PasswordChangeHistorySource
WHERE MaGuid = '" & MIIS_ManagementAgent.Guid &
"')"
.Set changeHistories =
Service.ExecQuery("Select * from MIIS_PasswordChangeHistorySource
WHERE ReferenceGuid = '" &
MIIS_PasswordChangeHistoryTarget.ReferenceGuid &
"')"
.Set changeHistories = Service.ExecQuery("Select *
from MIIS_PasswordChangeHistorySource WHERE Guid = '" &
GUID From the EventDetails method &
"')"
.Each query field can only appear once except when searching for
a history entry that occurred before or after a specified time.
Query fields can be combined using the AND operator. For
example, Set changeHistories = Service.ExecQuery("Select *
from MIIS_PasswordChangeHistorySource WHERE MaGuid = '" &
MIIS_ManagementAgent.Guid & "' AND CsGuid = '" &
MIIS_CSObject.Guid & "')"
In the previous example, the WHERE statement can use the following items:
The following Visual Basic Scripting Edition (VBScript) example shows how to use this class to get the password change history by user.
Option Explicit On Error Resume Next Const PktPrivacy = 6 ' Authentication level Dim Service ' Service object Dim queryString ' SQL Query string Dim userName ' sAMAccountName of the user Dim domainName ' User domain Dim errorString ' Error string Dim statusString ' Status string Dim CSUsers ' Connector space user collection Dim User ' Connector space user Dim changeHistories ' Change history collection Dim changeHistory ' Change history member userName = "jeffsmith" domainName ="fabrikam" Set Service = GetObject("winmgmts:{authenticationLevel=PktPrivacy}!root\MicrosoftIdentityIntegrationServer") If err.number<>0 then errorString = "Could not retrieve service object: " errorString = errorString & Err.Description ErrorHandler(errorString) End If queryString = "Select * From MIIS_CSObject WHERE Domain = " queryString = queryString & "'" & domainName & "' " queryString = queryString & "and account = '" & userName & "'" Set CSUsers = Service.ExecQuery(queryString) If err.number <> 0 then errorString = "Could not find the user: " errorString = errorString & err.Description ErrorHandler(errorString) End If If CSUsers.Count = 0 then statusString = "No users with that sAMAccountName." ErrorHandler(statusString) End If For each User in CSUsers queryString = "Select * from MIIS_PasswordChangeHistorySource WHERE " queryString = queryString & "CsGuid = '" queryString = queryString & User.Guid & "'" Set changeHistories = Service.ExecQuery(queryString) If err.number <> 0 then errorString = "Could not retrieve password change history: " errorString = errorString & Err.Description ErrorHandler(errorString) End If If changeHistories.Count = 0 then statusString = "There are no password change histories for the " statusString = statusString & "user " & User.Account & "." WScript.Echo statusString Else For Each changeHistory in changeHistories statusString = "Change History for this user " statusString = statusString & userName &":" WScript.Echo statusString WScript.Echo changeHistory.eventDetails Next End If Next Sub ErrorHandler (ErrorMessage) WScript.Echo ErrorMessage WScript.Quit(1) End Sub
Server: Requires Microsoft Identity Integration Server
2003 Service Pack 1.
Header: Declared in mmswmi.mof.
Example: Searching for Password Change Requests from a Connected Data Source