Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Assign a record to team and user don't have privilege to view teams record

Posted on by 65

Hi 

I have a requirement were on record save record should get assigned to team and created user don't have privileges to read,write teams record.

I wrote java-script to assign record to a team. now on-save it is throwing error and record is not getting assigned.

error

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: SecLib::AccessCheckEx2 failed. Returned hr = -2147187962, ObjectId: 7dbd6547-7730-ea11-80f5-005056ac4c4c, OwnerId: 170d335a-4eed-e711-80ca-005056ac0707, OwnerIdType: 9 and CallingUser: d364dd0e-a22c-ea11-80f5-005056ac4c4c, CallerBusinessId: 5702bbe8-e8b3-e211-ad26-0050568979d8. ObjectTypeCode: 10216, ObjectBusinessUnitId: e8e43662-5da4-e711-80ce-005056ac4c4c, AccessRights: ReadAccess. Computed rightsToCheck=ReadAccess, grantedRights=8, hsmGrantedRights=None, grantedRightsWithHsm=8.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>31d40844-34ec-4d44-a0c3-2ff99de9c840</ActivityId>
<ErrorCode>-2147187962</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<Message>SecLib::AccessCheckEx2 failed. Returned hr = -2147187962, ObjectId: 7dbd6547-7730-ea11-80f5-005056ac4c4c, OwnerId: 170d335a-4eed-e711-80ca-005056ac0707, OwnerIdType: 9 and CallingUser: d364dd0e-a22c-ea11-80f5-005056ac4c4c, CallerBusinessId: 5702bbe8-e8b3-e211-ad26-0050568979d8. ObjectTypeCode: 10216,
ObjectBusinessUnitId: e8e43662-5da4-e711-80ce-005056ac4c4c,
AccessRights: ReadAccess. Computed rightsToCheck=ReadAccess, grantedRights=8, hsmGrantedRights=None, grantedRightsWithHsm=8.</Message>
<Timestamp>2020-01-06T11:26:59.5001191Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Assign a record to team and user don't have privilege to view teams record

    In addition to above answer check the access level of the entity for  UPDATE/CREATE access rights (for create case) -

    - BU level access required (if team user  and records are in same BU )  

    - Parent Child BU level access required (if the record and user of the team are in Parent child BU)

    - Organization level access required (if the record and user of the team are in different BU)

  • Suggested answer
    Neeraj Pawar Profile Picture
    Neeraj Pawar on at
    RE: Assign a record to team and user don't have privilege to view teams record

    Hi,

    By the error it looks like the team to which we are assigning the record, doesn't have enough privilege to own the assigned record. Kindly validate if team's security role has the required privileges and assign the missing privileges as required.

    Start with providing privileges for entity with object type code 10216, to identify the entity you can add the org name and region details to below URL and browse it.

    https://[orgname].[region].dynamics.com/api/data/v9.1//EntityDefinitions?$select=MetadataId,SchemaName,LogicalName,ObjectTypeCode&$filter=ObjectTypeCode%20%20eq%2010216

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Assign a record to team and user don't have privilege to view teams record

    Hello,

    You have 2 ways out:

    1. Give user Read and Assign To privileges for team entity.

    2. Change the approach - use Workflow, Power Automate(if it's applicable) or Plugin.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans