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

Announcements

No record found.

News and Announcements icon
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

  • JAngle Profile Picture
    161 on at

    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

  • rpratdesaba Profile Picture
    5 on at

    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

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at
  • Suggested answer
    JAngle Profile Picture
    161 on at

    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;

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 554 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 360 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 201 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans