Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFSecurity.AddIdentity Method (PISystem, AFSecurityIdentity, AFSecurityRights, AFSecurityRights, AFSecurityOperation)

AFSecurity.AddIdentity Method (PISystem, AFSecurityIdentity, AFSecurityRights, AFSecurityRights, AFSecurityOperation)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFSecurity.AddIdentity Method (PISystem, AFSecurityIdentity, AFSecurityRights, AFSecurityRights, AFSecurityOperation)
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.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in