Minimum Privileges Required to Log in to Model-driven Apps in Dynamics 365/Microsoft Dataverse

One of the security best practices in Dynamics 365 is to use the base security role as a baseline and apply that role to all Users. The base security role will include all the common/basic permissions that are required to have access to the system (you can read more details in  Tip #2 of Power Platform / Dynamics CRM  Tip of the Day). The advantage of using the base security role is to allow the administrator to add/remove privilege for all users by just updating the base security role instead of having to go through all the security roles. The base security role is different for each project depending on what the user with the minimum permission should be able to perform in the system.

🛈 Note

Microsoft has renamed the min priv apps use security role as an App Opener role.  It can be used as the base security role in your system or can be copied to start your custom security role.

To set up the base security role for the first time
  1. create a new empty security role.
  2. add the minimum privileges required to access the system.
  3. add the privileges required for the basic functionalities.
  4. test the role with the test user account.
  5. add the permissions to the entities that all users can access (e.g. reference data).
If you are not sure what are the privileges required, step 2 and 3 can be time-consuming since those two need to be identified by trial and error. Microsoft has added a new standard role called Common Data Service User and that is the ideal role for your base role instead of the empty role in step 1. But that role has quite a lot of privileges for standard CDS entities and if your organisation requires a really strict base security role, it might be better off starting with an empty role.

In that case, there are a few old articles by Inogic and Goutam Das which contains the template for the base security role. This post will be similar to those two posts but I will try my best to describe why each of those privileges is required for each particular functionality. At that same time, I hope that will be helpful for those who are looking for the solution of a particular function not working well due to the missing privilege. (e.g. unable to run an on-demand workflow, Business Rule is not working, etc.)

In today's fast-paced Power Platform world, the structure of the security role keeps changing and more privileges are added in each major updates. My plan is to keep updating this post whenever there is an additional privilege added in the future updates which need to be part of the base security role. Please also leave a comment if you identify any privilege which is not part of the list below.


CDS and Dynamics 365 Privileges

So, what are the minimum privileges required to log in to the model-driven app?
- Read privilege to the Model-driven App entity. Voilà... You can log in to the model-driven app as long as the user has the security role with Organization level 🟢 prvReadAppModule.
But wait, prvReadAppModule is just the minimum privileges required to log in to the model-driven app. That does not mean the app will be functional only with that privilege. You will just see the Sitemap with Recent, Pinned, Dashboards, etc. clicking on any of those will just show an error page. These are the minimum privileges required to log in to the *functioning* model-driven app

The following table was last updated in July 2020 based on CDS version 9.1.0000.20151.

These are the hidden privileges and you do not specifically need to add in the security role.

Privilege Name Privilege Access Level
prvReadSharePointDocument Read Organization
prvCreateSharePointData Create Organization
prvReadSharePointData Read Organization
prvWriteSharePointData Write Organization

These are the privileges required to load the UI components of the model-driven app and they are all in the Customization tab of the security role form. And make sure the base security role has access to that particular model-driven app.

Privilege Name Entity Privilege Access Level
prvReadAttributeMap Attribute Map Read Organization
prvReadCustomization Customizations Read Organization
prvReadEntity Entity Read Organization
prvReadEntityKey Entity Key Read Organization
prvReadEntityMap Entity Map Read Organization
prvReadAttribute Field Read Organization
prvReadAppModule Model-driven App Read Organization
prvReadOptionSet Option Set Read Organization
prvReadRelationship Relationship Read Organization
prvReadSavedQueryVisualizations System Chart Read Organization
prvReadSystemForm System Form Read Organization
prvReadQuery View Read Organization
prvReadWebResource Web Resource Read Organization




The following privileges are required for some common basic functionalities in the model-driven apps as specified in the Required For column

Privilege Name Tab Entity Privilege Access Level Required For
prvReadUserSettings Business Management User Settings Read Business Unit Personal Options
prvWriteUserSettings Business Management User Settings Write Business Unit
prvCreateUserEntityUISettings Core Records User Entity UI Settings Create User Getting/Saving UI setting for the user such as Recent Items, Pin Items, etc.
prvReadUserEntityUISettings Core Records User Entity UI Settings Read User
prvWriteUserEntityUISettings Core Records User Entity UI Settings Write User
prvCreateUserQuery Core Records Saved View Create User Managing personal Saved Views
prvReadUserQuery Core Records Saved View Read User
prvWriteUserQuery Core Records Saved View Write User
prvDeleteUserQuery Core Records Saved View Delete User
prvAssignUserQuery Core Records Saved View Assign User
prvShareUserQuery Core Records Saved View Share User
prvFlow Customization Run Flows N/A Organization Running On-demand Power Automate flows and showing On-demand workflows in Unified Interface
prvWorkflowExecution Customization Execute Workflow Job N/A Organization Running On-demand workflows
prvReadWorkflow Customization Process Read Organization Business Process Flow, On-demand workflows, Business Rules
prvAppendToWorkflow Customization Process Append To Organization Business Process Flow, On-demand workflows
prvReadAsyncOperation Customization System Job Read User

/

Organization
On-demand workflows
/
To view status of the run flow in BPF
prvCreate*BPFEntityName* Business Process Flows *BPF Name* Create Organization Business Process Flow
prvRead*BPFEntityName* Business Process Flows *BPF Name* Read Organization
prvWrite*BPFEntityName* Business Process Flows *BPF Name* Write Organization
prvAppend*BPFEntityName* Business Process Flows *BPF Name* Append Organization
prvAppendTo*BPFEntityName Business Process Flows *BPF Name* AppendTo Organization

Dynamics 365 Specific Privileges

The privileges above might be enough for the model-driven app in the CDS but in Dynamics 365, there are some system scripts which query certain data in the backend. Some of those WebAPI calls will fail silently but some may throw a generic error as below in Unified Interface.
You do not have {0} permission to access {1} records. Contact your Microsoft Dynamics 365 administrator for help.


In that case, open the Developer Tools of the browser and check the descriptive error in the Network tab (with Result "Forbidden" / Status "403" errors) to find out which privilege is missing. You can read more about deciphering the Unified Interface generic permission errors in this blog post by Alex Shlega.

The descriptive error message will say that the user is missing prvActionEntity. If you are not sure where that privilege is located in the security role form, one of the methods is to check this old Dynamics CRM 2016 documentation. I am not sure why "Security role UI to privilege mapping" is no longer included in the Dynamics 365 Customer Engagement (on-premises) documentation or Power Platform documentation. If you see the privilege but not sure if it the prvActionEntity specified by the error message, you can open up the Developer Tools of the browser and inspect the element (Ctrl + Shift + C in Chrome) to see the backend privilege name.






You can also identify those scripts which fail silently due to the missing privileges by checking the error lines in the Network tab of the browser's Developer Tools. Another alternative way is checking the network request details in the recently announced monitor tool for model-driven apps.


Here are some examples of the privileges required by the system scripts.

Privilege Name Tab Entity Privilege Access Level Required For
prvReadOrganization Business Management Organization Read Organization Dynamics 365 environment with Microsoft Teams integration Script Error for Web Request: /api/data/v9.0/organizations(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)?$select=ismsteamsenabled,ismsteamscollaborationenabled
prvReadUser Business Management User Read Business Unit System script to read azureactivedirectoryobjectid of current user Script Error for Web Request: /api/data/V9.1/systemusers()?$select=azureactivedirectoryobjectid&$filter=systemuserid%20eq%20xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
prvReadSdkMessage Customization Sdk Message Read Organization System script to read SDK Message Names Script Error for Web Request: /api/data/v9.0/sdkmessages(4c53ccbd-bbfa-4aad-a725-ffba2246d683)?$select=name
prvReadRoutingRule Service Management Routing Rule Set Read User System scripts for routing rules Script Error for Web Request: /api/data/v9.0/routingrules?$filter=msdyn_entitylogicalname%20eq%20%27ENTITYNAME%27
prvReadmsdyn_PostConfig Custom Entities Post Configuration Read Organization System scripts for activity feed Script Error for Web Request: /xrmservices/2011/OrganizationData.svc/msdyn_PostConfigSet?$select=msdyn_EntityName,statecode&$filter=msdyn_EntityName%20eq%20%27ENTITYNAME%27
prvReadActivity Core Records Activity Read User System scripts in Omnichannel for Customer Service Script Error for Web Request: /api/data/v9.0/msdyn_ocliveworkitems?$filter=_regardingobjectid_value%20eq%20%27xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%27%20and%20statecode%20ne%203%20and%20statuscode%20ne%204

Comments

  1. It's worth saying that the Error code you are looking for in the Network tab of the Developer Tools is for Forbidden / 403 errors.

    I would also say that all the security roles listed are required - I suspect you would get some very interesting support requests that would take a long time to debug if one of those roles were missing.

    ReplyDelete
    Replies
    1. That should (of course) read all the security privileges listed are required for the role..

      Delete
    2. Thanks for the feedbak eek, I have updated the blog post to add "Forbidden / 403 errors" around network tab part.

      Delete
  2. Thanks! This saved my day!

    ReplyDelete
  3. Я реальный человек и хочу рассказать вам о своем успешном выигрыше в интернет-казино Вавада. Вот уже несколько недель я играю на их мобильной платформе, и мне нравится все: от простой регистрации до быстрых выплат. Вавада мобильная vavada kazino infolr 213 - это самое удобное место для игры в слоты и получения крупных сумм! Интерфейс сайта действительно очень удобный, я легко нашел все нужные мне игры и наслаждаюсь игрой каждый день. А еще казино Вавада предлагает приветственный бонус и фриспины, что приятно удивило меня. Я действительно считаю, что Вавада - это одно из самых лучших интернет-казино, и я рекомендую его всем своим друзьям и знакомым. Если вы хотите почувствовать ту же азарт и веселье, то переходите по ссылке https://vavadasss.fun/ и начинайте выигрывать прямо сейчас!

    ReplyDelete
  4. Рекомендую взглянуть на коллекцию Темного красного фона, содержащую 62 захватывающих фотографии. Этот уникальный фон подойдет для создания эффектного и запоминающегося дизайна. Он добавит глубину и интригу вашим проектам, будь то веб-сайты, баннеры, презентации или социальные медиа. Такой фон идеален для создания атмосферы роскоши, тайны и страсти. Убедитесь сами, перейдя по ссылке https://cojo.ru/fony/temnyy-krasnyy-fon-62-foto/. Там вы найдете множество вариантов, которые помогут вам выделиться и создать неповторимый образ.

    ReplyDelete
  5. Ах, сколько радостных переживаний наполняют мою душу, когда вижу эти картинки счастья! Такие моменты несомненно делают жизнь яркой и прекрасной. Если хочешь еще больше улыбок и положительных эмоций, то рекомендую заглянуть вот сюда: https://cvam.ru/schaste-byvaet. Там ты найдешь еще больше зарядов радости и вдохновения!

    ReplyDelete
  6. Современные развлекательные течения предлагают весомое множество вариантов досуга, но особенной вниманием радуются виртуальные приложения. На сайте игры бесплатно gmx-mails.com вы обнаружите множество популярных и интересных игр, предоставляемых полностью без денег.

    ReplyDelete
  7. Хочу порекомендовать вам прекрасную подборку картинок с изображением сердца, которая состоит из 47 фотографий. Эти красивые и эмоциональные изображения сможет поразить ваше сердце и покорить ваш взгляд. Вы можете найти эту замечательную подборку по ссылке https://cojo.ru/kartinki/krasivye-kartinki-serdtse-47-foto/. Не упустите возможность насладиться этой красотой и поделиться ею с близкими!

    ReplyDelete
  8. Привет! Я нашел замечательную галерею с 63 вдохновляющими фотографиями по теме Спина референс. Если ты любишь картинки и фото, то обязательно пройди по ссылке и посмотри эту потрясающую подборку. В ней ты найдешь множество интересных и оригинальных спин, которые могут послужить отличным источником вдохновения для своих проектов. Я уже посмотрел галерею и остался в восторге! Чтобы посетить сайт и насладиться фото, переходи по ссылке: https://douo.ru/spina-referens/. Не упусти возможность окунуться в мир красивых и выразительных спин!

    ReplyDelete
  9. Продукция бритвы gillette купить оптом, это отличный способ начать свое дело. Постоянные распродажи на сменные кассеты gillette fusion. Средства для бритья триммер-лезвие fusion практичные комплекты gillette купить оптом по минимальной стоимости производителя. Не упустите возможность заказать лезвия джилет mach3, станки для бритья джиллет фьюжен проглайд, а также любой другой продукт серии жилет мак 3 по оптимальной цене!. Хит продаж одноразовые бритвенные станки gillette 2.

    ReplyDelete
  10. Меня зовут Алексей, и я хотел бы рассказать о своем опыте игры в интернет-казино Вавада. Я был очень рад, когда наткнулся на вавада зеркало на сегодняшний день vavadaraz1. Оно позволило мне получить доступ к любимым слотам и роскошным бонусам. Простая регистрация и удобный интерфейс сайта сразу же привлекли мое внимание. Кроме того, быстрые выплаты и приветственный бонус помогали мне увеличить свои шансы на крупные суммы. Не могу не упомянуть и фриспины, которые постоянно дарили мне возможность сыграть еще больше. Если вы ищете надежное и выгодное казино, я настоятельно рекомендую посетить сайт https://vavadaw1.site/ и попробовать свою удачу в Вавада.

    ReplyDelete
  11. Привет, дядя Вася! Вдруг у тебя скоро внучку день рожденье будет? Вот нашел прикольную онлайн открытку, которую с рождением внуку бабушка в подарок может дать. Больше ничего покупать не нужно, и не надо думать, какой подарок выбрать. Такая сеть позволяет накидать сообщение руками, и послать в онлайне, а внук обрадуется и вас обнимет и целовать будет. Вот ссылка на открытку с днем рождения внуку от бабушки, и выдали ее бесплатно. Пользуйся, сохрани себе в закладки, чтобы на будущее быть готовым. Открытка с днем рождения внуку от бабушки бесплатные. Всем привет от меня, расскажи потом, как внук порадовался, она должна ему понравиться!

    ReplyDelete
  12. Продукция съемные кассеты gillette купить оптом, это отличное начало нового бизнеса. Постоянные распродажи на сменные кассеты джилет фьюжен. Средства для бритья лезвие fusion практичные наборы gillette купить оптом по оптимальной цене производителя. Не упустите возможность приобрести джилет мак 3 кассеты, станки для бритья джилет мак 3 турбо, а также любой другой продукт серии gillette mach 3 по оптимальной цене!. Хит продаж одноразовые станки для бритья gillette venus.

    ReplyDelete

Post a Comment

Popular Posts