AnsweredAssumed Answered

How to search for a domain user to add to a notification

Question asked by BrianHollaway on Jun 17, 2020
Latest reply on Jun 18, 2020 by BrianHollaway

I can search in the PI System Explorer using Contacts | New search... to find a domain user account with the associated email, but using the PI AF SDK call AFNotificationContactTemplateSearch doesn't seem to give the same results. Here is an example PI AF SDK call, using the exact same query that works in PI System Explorer:

 

PISystems AFSyss = new PISystems();
PISystem AFsys = AFSyss["GIC Dashboard Test"];
AFsys.Connect();
AFDatabase AFDB = AFsys.Databases["SPI"];
OSIsoft.AF.Search.AFNotificationContactTemplateSearch search = new OSIsoft.AF.Search.AFNotificationContactTemplateSearch(
AFsys, string.Empty, "Name:'A016532*'");
var contacts = search.FindObjects(fullLoad: true);

 

(contacts are empty)

 

Here is the PI System Explorer search:

 

 

What is the right way to search for a domain user so that they can be added to a notification?

Outcomes