web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Prevent BC from login using different profile

(0) ShareShare
ReportReport
Posted on by 5

Hi everybody,

  1. Currently I have set up a user within a User Group that it has a Role (profile) associated
  2. This User Group has also very limited permissions (no design, no Zoom, basic tables, etc.)
  3. Role (profile) associated was customized (using /?customize&profile=XXXX) to hide different Unit Cost columns on Item, Item Ledger, etc.
  4. Role (profile) associated was customized also to prevent to be changed on Settings > My Settings > Role selector  by hidding this field
  5. Checkbox "DisaRole (profile) associated was customized also to prevent to be changed on Settings > My Settings > Role selector  by hidding this field
  6. "Disable Personalization" checkbox was also checked on user's Role (profile) 

At this point, everything worked fine, so user couldn't change his role and see hidden columns. However, any sharp user could open BC by setting profile parameter in URL (bc-onprem/ and see any other data that he/she shoudn't.

Is there any way to avoid that within BC?

PD: I guess I can setup a group of allowed URLs on IIS preventing use of specific roles, but maybe that is like use a hammer to crack a nut...I've also tried out to disable read permissions to All Role table (200000178), but didn't worked as well.

Thanks in advance.

Roger

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    119 on at
    RE: Prevent BC from login using different profile

    Different approach entirely. Use an event on the login management codeunit such as the below. You could then check what the user has for user personalisation and error. If you need a bypass then add that logic in too but in a controlled area of setup.

    [IntegrationEvent(false, false)]
    local procedure OnAfterCompanyOpen()
    begin
    end;

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Prevent BC from login using different profile

    Hello,

    Maybe this helps.

    docs.microsoft.com/.../ui-define-granular-permissions

    Thanks.

  • rpratdesaba Profile Picture
    5 on at
    RE: Prevent BC from login using different profile

    Appreciate your answer Josh. I tried this before and BC does not apply security filter appropriately to TableData “All Roles” which is what is behind page when choosing Profile. Seems that he does not take in mind...maybe cause is a System table...not sure.

    Anyway, even it would be correctly filtered I guess user could login modifying profile parameter as well in URL.

    Keep in touch

  • JAngle Profile Picture
    119 on at
    RE: Prevent BC from login using different profile

    Not tried it but maybe a security filter would aid you here. Add a filter for the relevant profile table or user personalisation for the only profile they are allowed to use. Not sure if either are tables you can apply one to. Method here: 

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/security/security-filters

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 4,252

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,117

#3
Sumit Singh Profile Picture

Sumit Singh 2,956

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans