Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Permit only opportunity owner to assign ownership causes error

(0) ShareShare
ReportReport
Posted on by 45

Annotation-2019_2D00_05_2D00_26-121506.jpg

I attempted to change security roles to make it so that only the opportunity owner can assign ownership of that opportunity.  It works, but produces an error every time.  I'd be grateful for help eliminating the error below:

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: {"CallerPrincipal":{"PrincipalId":"c19258a9-f877-e511-80df-3863bb2ec340","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"OwnerPrincipal":{"PrincipalId":"c439fddd-437c-4804-a0dd-692a49fcce0b","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"ObjectId":"43113146-cd7f-e911-a978-000d3a1991fc","ObjectTypeCode":3,"ObjectBusinessUnitId":"50c0b543-5663-e511-80d7-3863bb348e10","OrganizationId":"cb3f92b5-9e54-4f0d-97b7-65decb018df7","EntityName":"opportunity","EntityOwnershipTypeMask":1,"RightsToCheck":"AssignAccess","RoleAccessRights":"None","PoaAccessRights":"None","HsmAccessRights":"None","Messages":["PrincipalHasOwnerPrincipalWithAtLeastBasicPrivilegeDepth = False","EntityUserGroupRights = None","MinimumDepthRequired = Local","GrantedRights = None","SecLib::AccessCheckEx2 failed. Owner Data: roleCount=4, privilegeCount=1569, accessMode=0; Principal Data: roleCount=7, privilegeCount=676, accessMode=0"]}Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>6e4d7efc-9bab-41fc-bb80-7b9316d134ee</ActivityId>
<ErrorCode>-2147187962</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionSourceKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.ObjectModel.CustomBusinessEntityService</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmSecurityException: {"CallerPrincipal":{"PrincipalId":"c19258a9-f877-e511-80df-3863bb2ec340","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"OwnerPrincipal":{"PrincipalId":"c439fddd-437c-4804-a0dd-692a49fcce0b","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"ObjectId":"43113146-cd7f-e911-a978-000d3a1991fc","ObjectTypeCode":3,"ObjectBusinessUnitId":"50c0b543-5663-e511-80d7-3863bb348e10","OrganizationId":"cb3f92b5-9e54-4f0d-97b7-65decb018df7","EntityName":"opportunity","EntityOwnershipTypeMask":1,"RightsToCheck":"AssignAccess","RoleAccessRights":"None","PoaAccessRights":"None","HsmAccessRights":"None","Messages":["PrincipalHasOwnerPrincipalWithAtLeastBasicPrivilegeDepth = False","EntityUserGroupRights = None","MinimumDepthRequired = Local","GrantedRights = None","SecLib::AccessCheckEx2 failed. Owner Data: roleCount=4, privilegeCount=1569, accessMode=0; Principal Data: roleCount=7, privilegeCount=676, accessMode=0"]} ---&gt; Microsoft.Crm.CrmSecurityException: {"CallerPrincipal":{"PrincipalId":"c19258a9-f877-e511-80df-3863bb2ec340","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"OwnerPrincipal":{"PrincipalId":"c439fddd-437c-4804-a0dd-692a49fcce0b","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"ObjectId":"43113146-cd7f-e911-a978-000d3a1991fc","ObjectTypeCode":3,"ObjectBusinessUnitId":"50c0b543-5663-e511-80d7-3863bb348e10","OrganizationId":"cb3f92b5-9e54-4f0d-97b7-65decb018df7","EntityName":"opportunity","EntityOwnershipTypeMask":1,"RightsToCheck":"AssignAccess","RoleAccessRights":"None","PoaAccessRights":"None","HsmAccessRights":"None","Messages":["PrincipalHasOwnerPrincipalWithAtLeastBasicPrivilegeDepth = False","EntityUserGroupRights = None","MinimumDepthRequired = Local","GrantedRights = None","SecLib::AccessCheckEx2 failed. Owner Data: roleCount=4, privilegeCount=1569, accessMode=0; Principal Data: roleCount=7, privilegeCount=676, accessMode=0"]}
at Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx2(ExecutionContext context, SecurityPrincipal principal, SecurityPrincipal ownerPrincipal, Guid objectId, Int32 objectTypeCode, Guid objectBusinessUnitId, AccessRights rights)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx(ExecutionContext context, SecurityAttributes attributes, AccessRights rights)
at Microsoft.Crm.BusinessEntities.CascadeEngine.&lt;&gt;c__DisplayClass47_0.&lt;AssignDB&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Assign(BusinessEntityMoniker moniker, SecurityPrincipal assignee, ExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">ddc9bb1b-ea3e-db11-86a7-000a3a5473e8</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiDepthKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">1</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiActivityIdKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">6e4d7efc-9bab-41fc-bb80-7b9316d134ee</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>{"CallerPrincipal":{"PrincipalId":"c19258a9-f877-e511-80df-3863bb2ec340","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"OwnerPrincipal":{"PrincipalId":"c439fddd-437c-4804-a0dd-692a49fcce0b","Type":8,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"ObjectId":"43113146-cd7f-e911-a978-000d3a1991fc","ObjectTypeCode":3,"ObjectBusinessUnitId":"50c0b543-5663-e511-80d7-3863bb348e10","OrganizationId":"cb3f92b5-9e54-4f0d-97b7-65decb018df7","EntityName":"opportunity","EntityOwnershipTypeMask":1,"RightsToCheck":"AssignAccess","RoleAccessRights":"None","PoaAccessRights":"None","HsmAccessRights":"None","Messages":["PrincipalHasOwnerPrincipalWithAtLeastBasicPrivilegeDepth = False","EntityUserGroupRights = None","MinimumDepthRequired = Local","GrantedRights = None","SecLib::AccessCheckEx2 failed. Owner Data: roleCount=4, privilegeCount=1569, accessMode=0; Principal Data: roleCount=7, privilegeCount=676, accessMode=0"]}</Message>
<Timestamp>2019-05-26T15:45:57.2433538Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

*This post is locked for comments

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Permit only opportunity owner to assign ownership causes error

    I found a similar thread. Please go to below link, It may resolve your issue:

    community.dynamics.com/.../316068

  • Douger Profile Picture
    Douger 45 on at
    RE: Permit only opportunity owner to assign ownership causes error

    Correction.  User has organizational level Create, Read, Write, Append, Append To, and Share privileges.  To implement the desired result of preventing non-owners from changing ownership, I had changed the Assign privilege to User producing the error shown.

  • Douger Profile Picture
    Douger 45 on at
    RE: Permit only opportunity owner to assign ownership causes error

    Also I believe the image I posted shows that I have given organization level assign, read, write and append to the role to which this user is assigned.

  • Douger Profile Picture
    Douger 45 on at
    RE: Permit only opportunity owner to assign ownership causes error

    The permissions are set to allow the current user to continue to view and edit the opportunity.  I believe the error has something to do with cascading, but I don't no how to interpret the error info I posted above.

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Permit only opportunity owner to assign ownership causes error

    You need give organization level or BU level "Assign" access rights for opportunity entity to assign another user.

  • Kokulan Profile Picture
    Kokulan 18,050 on at
    RE: Permit only opportunity owner to assign ownership causes error

    Hi

    I think record assigning worked but the error displayed because as soon as the record is assigned to another user, the current user might be losing read access to it

    Please refer to the link below

    www.inogic.com/.../insufficient-permissions-error-on-assigning-a-record-in-dynamics-365

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans