Error running plugin

Jun 8, 2009 at 3:49 PM

When I run the Plugin with a user with Administrator rights everything is fine. But if i run it as a regullar user I get an error (error message bellow).

Can you help?

Thanks

Shimmy

Event Type: Error
Event Source: MSCRMWebService
Event Category: None
Event ID: 18176
Date:  08-06-09
Time:  17:55:55
User:  N/A
Computer: OPAL
Description:
Web Service Plug-in failed in OrganizationId: fd57cba5-6c80-427b-b797-b11222836475; SdkMessageProcessingStepId: 3f7a39f6-3d53-de11-ae77-00155d0a3a03; EntityName: account; Stage: 50; MessageName: Update; AssemblyName: Custom.Crm.Audit, Custom.Crm.Audit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e86f6c07b0fe8025; ClassName: Custom.Crm.Audit; Exception: Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request.
Detail: <detail><error>
  <code>0x80040220</code>
  <description>SecLib::CheckPrivilege failed. Returned hr = -2147220960, User: 7018d16d-f2af-dd11-8e23-000c291f65e5, PrivilegeId: a3311f47-2134-44ee-a258-6774018d4bc3</description>
  <type>Platform</type>
</error></detail>
   at Microsoft.Crm.Extensibility.SdkTypeProxyMetadataServiceWrapper.InternalInvoke(MethodInfo methodInfo, Object[] parameters)
   at Microsoft.Crm.Extensibility.SdkTypeProxyMetadataServiceWrapper.Execute(Object request)
   at Custom.Crm.Audit.Execute(IPluginExecutionContext context)
   at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)

 

Jun 10, 2009 at 6:10 AM

I found the solution. I needed to do some changes in the role and now all works.

I dident know how to remove the whole discussion.

Shimmy

Jun 24, 2009 at 7:21 PM
Edited Jun 24, 2009 at 7:21 PM

For anyone curious about how to fix this:

The plug-in executes a webservice call to read the metadata for the entity being audited, therefore it will fail if the user calling the plug-in does not have permission to read the metadata.

To fix this, on the users' security roles, go to the Customization tab and grant them privileges to read Entity, Attribute and Relationship.

-Matt Wittemann
CRM MVP
http://icu-mscrm.blogspot.com

Jul 8, 2010 at 8:40 PM
MattNC wrote:

For anyone curious about how to fix this:

The plug-in executes a webservice call to read the metadata for the entity being audited, therefore it will fail if the user calling the plug-in does not have permission to read the metadata.

To fix this, on the users' security roles, go to the Customization tab and grant them privileges to read Entity, Attribute and Relationship.

-Matt Wittemann
CRM MVP
http://icu-mscrm.blogspot.com

 Thanks, that is very useful!

Aug 6, 2010 at 4:47 AM

hi guys,i give role these privileges to user,but lead and account entity have error ID18176 XML documents error