AFSecurity.AddIdentity Method (PISystem, AFSecurityIdentity, AFSecurityRights, AFSecurityRights, AFSecurityOperation)
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Add security for an AFSecurityIdentity to all objects in the PISystem.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static void AddIdentity( PISystem system, AFSecurityIdentity identity, AFSecurityRights accessRights = AFSecurityRights.None, AFSecurityRights denyRights = AFSecurityRights.None, AFSecurityOperation operation = AFSecurityOperation.Merge )
Public Shared Sub AddIdentity ( system As PISystem, identity As AFSecurityIdentity, Optional accessRights As AFSecurityRights = AFSecurityRights.None, Optional denyRights As AFSecurityRights = AFSecurityRights.None, Optional operation As AFSecurityOperation = AFSecurityOperation.Merge ) Dim system As PISystem Dim identity As AFSecurityIdentity Dim accessRights As AFSecurityRights Dim denyRights As AFSecurityRights Dim operation As AFSecurityOperation AFSecurity.AddIdentity(system, identity, accessRights, denyRights, operation)
public: static void AddIdentity( PISystem^ system, AFSecurityIdentity^ identity, AFSecurityRights accessRights = AFSecurityRights::None, AFSecurityRights denyRights = AFSecurityRights::None, AFSecurityOperation operation = AFSecurityOperation::Merge )
static member AddIdentity : system : PISystem * identity : AFSecurityIdentity * ?accessRights : AFSecurityRights * ?denyRights : AFSecurityRights * ?operation : AFSecurityOperation (* Defaults: let _accessRights = defaultArg accessRights AFSecurityRights.None let _denyRights = defaultArg denyRights AFSecurityRights.None let _operation = defaultArg operation AFSecurityOperation.Merge *) -> unit
Parameters
- system
- Type: OSIsoft.AFPISystem
The PISystem containing the objects to be modified. - identity
- Type: OSIsoft.AFAFSecurityIdentity
The AFSecurityIdentity to be added to the objects. - accessRights (Optional)
- Type: OSIsoft.AFAFSecurityRights
The access security rights for the identity to be added to the objects. Specify None to not specify any access security rights to be added. - denyRights (Optional)
- Type: OSIsoft.AFAFSecurityRights
The deny security rights for the identity to be added to the objects. Specify None to not specify any deny security rights to be added. - operation (Optional)
- Type: OSIsoft.AFAFSecurityOperation
The security operation which defines the behavior when adding security rights to an object that the user already has security rights specified.
Remarks
This method will add the access and/or deny security rights for the security identity to every object
in the PI AF Server associated with the PISystem.
See the documentation for AFSecurityOperation for a description of the behavior of
calling this method on existing security rights for an object.