Tuesday, November 10, 2009

CRM: SecLib::CheckPrivilege failed.

SecLib::CheckPrivilege failed. Returned hr = -2147220960,
User: 38327113-f014-dd11-8a77-0004e240fb2e,
PrivilegeId: ea8e9601-500e-4bd7-be73-022f3269e5b6

A CRM application may encounter privilege error in some sdk operations (i.e.; CURD). It will be a time consuming task for a developer to trace such kind of error if they don't know how to check it. They have to go through each and every entity to identify whether the defined user roles have correct privileges or not.

The first and easiest way is here.
  • Take PrivilegeId from above error message. (e.g.; ea8e9601-500e-4bd7-be73-022f3269e5b6)
  • Run following query to retrieve privilege name which was not set correctly in user role

  • Give correct privilege (e.g.; Read Access to dvm_girorejectreason entity) to required Role assigned to the specific user (e.g.; 38327113-f014-dd11-8a77-0004e240fb2e). If you do not know how to check the user in SQL server please let me know.

Caution: If you cannot find the PrivilegId in error message, please check whether specified use has a role assigned to it. Most likely thing is there is no user role assign to that user.

1 comment:

Anonymous said...

Thanks you. it helped alot!

Post a Comment