MIIS_PasswordChangeHistorySource Class
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.
Syntax
class MIIS_PasswordChangeHistorySource
{
String CsGuid;
String DN;
String GUID;
String MaGuid;
String MIISReceiveTime;
String ReferenceGuid;
String ReturnCode;
String SourceServer;
String SourceChangeTime;
};
Methods
The MIIS_PasswordChangeHistorySource class defines the following method.
Method | Description |
---|---|
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 ILM 2007 FP1 Server in XML format. |
Properties
The MIIS_PasswordChangeHistorySource class defines the following properties.
CsGuid
Data type: String
Access type: Read-onlyGets the connector space globally unique identifier (GUID) of the object.
DN
Data type: String
Access type: Read-onlyGets the distinguished name of the object.
GUID
Data type: String
Access type: Read-only
Qualifiers: KeyGets the tracking GUID that is used to identify the password change request. This value is assigned by the ILM 2007 FP1 server to track the password change request.
MaGuid
Data type: String
Access type: Read-onlyGets the globally unique identifier (GUID) of the management agent that receives the password change request.
MIISReceiveTime
Data type: String
Access type: Read-onlyGets the date and time in Coordinated Universal Time that the password change was received by the ILM 2007 FP1 server.
ReferenceGuid
Data type: String
Access type: Read-onlyGets the reference GUID assigned by the Password Change Notification Service (PCNS) in the domain controller of the password change request.
ReturnCode
Data type: String
Access type: Read-onlyGets the results of the password change request.
SourceChangeTime
Data type: String
Access type: Read-onlyGets the date and time in Coordinated Universal Time that the password was changed on the source server.
SourceServer
Data type: String
Access type: Read-onlyGets the name of the source server that changed the password.
Remarks
The class supports the following restricted set of queries:
Search for a history entry with a specified connector space object GUID by using the CsGuid property in the query field. This GUID can be obtained from the MIIS_CSObject.Guid property, for example, "Set changeHistories = Service.ExecQuery("Select * from MIIS_PasswordChangeHistorySource WHERE CsGuid = '" & MIIS_CSObject.Guid & "')"".
Search for a history entry that occurred before or after a specified time by using the MIISReceiveTime property in the query field, for example, "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.
Search for a history entry from a specified management agent by using the MaGuid property in the query field. The GUID of the management agent can be obtained from the MIIS_ManagementAgent.Guid property, for example, "Set changeHistories = Service.ExecQuery("Select * from MIIS_PasswordChangeHistorySource WHERE MaGuid = '" & MIIS_ManagementAgent.Guid & "')"".
Search for a history entry from a specified reference GUID by using the ReferenceGuid property in the query field. You can obtain the reference GUID from the MIIS_PasswordChangeHistoryTarget.ReferenceGuid or the MIIS_PasswordChangeQueue.ReferenceGuid property, for example, "Set changeHistories = Service.ExecQuery("Select * from MIIS_PasswordChangeHistorySource WHERE ReferenceGuid = '" & MIIS_PasswordChangeHistoryTarget.ReferenceGuid & "')"".
Search for a history entry from a specified GUID assigned to this object by using the GUID property in the query field. You can obtain the GUID from the EventDetails method, for example, "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 with 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:
- "ReferenceGuid = guid"
- "MIISReceiveTime < time, MIISReceiveTime > time", ("MIISReceiveTime > time AND MIISReceiveTime < time")
- "CsGuid = guid"
- "GUID = guid"
- "MaGuid = guid"
Each Query Field can only appear once. All of them can be ANDed with each other.
Examples
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
Requirements
Product | Microsoft Identity Integration Server 2003 SP1 |
MOF | Mmswmi.mof |
Namespace | MicrosoftIdentityIntegrationServer |
See Also
Example: Searching for Password Change Requests from a Connected Data Source
Send comments about this topic to Microsoft
Build date: 2/16/2009