0
votes

In Dynamics-365 crm, I want to grant read-write access request to an user of D-365 to a specific record of an entity if the user is not privileged with that privileges.

I did that by assigning some sort of security roles to that user. But I can't do that by modifying security role.

So how can I do that without assigning security role?

2

2 Answers

1
votes

You can achieve the same share functionality in code using GrantAccessRequest, refer my another Stack Overflow answer for C# plugin example.

For web api, your org has to be greater than v9.0 as GrantAccess message was not available in web api till v8.2

Still to achieve this object based security model, you should give users privilege to read-write that entity records through role based security model. Without user having entity edit privilege in security role they cannot edit by getting record sharing.

Read more: Use record-based security to control access to records

1
votes

If you do not wish to change/update your security Roles, then you can do so by sharing a particular Record with Either Team or User.Below 2 images will help you explain how to share a Record. Now this process below is manual and you could achieve this process programmatically as well using C# i.e server side coding

enter image description here

enter image description here

Note: If this solves your problem do mark this answer as solved.