How to grant permission to create PI Point through AF SDK?   to fix error "Insufficient privilege to access the PI Server."

Discussion created by ChewCheeLim on Aug 27, 2013
Latest reply on Aug 29, 2013 by xwang

Hi, I am getting this error message in code when trying to create PI Tag in af model created through AF SDK.


Currently af db is granting permission below - code snippet



sDescriptor = sDescriptor + string.Format("|{0}:A(r,w,rd,wd,d,x,a,s,so)", newAfDb.PISystem.CurrentUserName);
                oSecurityAF.SetSecurityString(sDescriptor, true);
                newAfDb.GetSecurity(AFSecurityItem.Element).SetSecurityString(sDescriptor, true);
                newAfDb.GetSecurity(AFSecurityItem.ElementTemplate).SetSecurityString(sDescriptor, true);



How do I grant current user to have permission to create PI Tag, hence update and insert time series data into PI?




Many thanks