Dynamics 365 Business Central: checking user permissions on specific objects

With the refactoring done in Dynamics 365 Business Central for better supporting the SaaS environment, is not quite easy to check if a user has a specific permission on a specific object.

Permission Range table is now a system table that cannot be used on a SaaS environment, License Permission table does not give you specific user permissions and using the ReadPermission and WritePermission methods (that can determine if a user has read and write permission on the object) is only available for table objects and often this is not enough if you have complex security checks to implement (for example if you want to test if your user has execute permissions on a specific codeunit).

Source : Stefano Demiliani
Read more…

Dynamics 365 Business Central on-premise: checking extension’s status via Powershell

An interesting question pops out yesterday: with Dynamics 365 Business Central on-premise, how can I programmatically check if a particular extension is installed or not?

The standard Powershell command (in the Microsoft.Dynamics.Nav.Apps.Management module) that gets informations about an extension in a specified Business Central Server instance is the Get-NAVAppInfo cmdlet (more info about it here).

Source : Stefano Demiliani
Read more…