AFAdmin.AddTrustedProvider Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Add the specified trusted provider subject name to the list of trusted providers in the PISystem.
Namespace: OSIsoft.AF.Diagnostics
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static void AddTrustedProvider( PISystem system, string provider )
Public Shared Sub AddTrustedProvider ( system As PISystem, provider As String ) Dim system As PISystem Dim provider As String AFAdmin.AddTrustedProvider(system, provider)
public: static void AddTrustedProvider( PISystem^ system, String^ provider )
static member AddTrustedProvider : system : PISystem * provider : string -> unit
Parameters
- system
- Type: OSIsoft.AFPISystem
The operation will be performed on the specified PISystem. - provider
- Type: SystemString
The subject name in the plugin's certificate to be used when validating the AFPlugIn being loaded from the server.
Exceptions
| Exception | Condition |
|---|---|
| SecurityException | This exception is thrown when attempting to execute without Admin security rights. |
| ArgumentNullException | This exception is thrown when attempting to execute on a PISystem that is null or deleted. |
| NotSupportedException | This exception is thrown when attempting to execute on a PISystem that does not support the AdminFunctionality feature. |
Remarks
This method is used to add the specified trusted provider subject name to the list of trusted providers in the PISystem. This list is used when validating the AFPlugIn being loaded from the server when the plugin verify level (see GetPlugInVerifyLevel(PISystem)) is RequireSignedTrustedProvider.
Use the PISystem.Supports method to check if the PISystem supports the AdminFunctionality feature.
| Requires the Admin right to execute. |
| This method will error on servers before AF 2018 R2 (2.10.5). |