PIIdentityMappings.Add Method (String, String, String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Creates a new PIIdentityMapping with the passed in name.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public PIIdentityMapping Add( string name, string principalName, string identity )
Public Function Add ( name As String, principalName As String, identity As String ) As PIIdentityMapping Dim instance As PIIdentityMappings Dim name As String Dim principalName As String Dim identity As String Dim returnValue As PIIdentityMapping returnValue = instance.Add(name, principalName, identity)
public: PIIdentityMapping^ Add( String^ name, String^ principalName, String^ identity )
member Add : name : string * principalName : string * identity : string -> PIIdentityMapping
Parameters
- name
- Type: SystemString
Name of the new PIIdentityMapping - principalName
- Type: SystemString
Account Name of the new PIIdentityMapping - identity
- Type: SystemString
The existing identity name that the new PIIdentityMapping will be mapped to
Return Value
Type: PIIdentityMappingReference to the new PIIdentityMapping.
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | If a PIIdentityMapping with the same name already exists. |