community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Dynamics 365 Business Central: How to get current Profile (Role) info (Profile ID, Display Name, Source, Role Center ID, etc.) via AL

This post demonstrates how to retrieve current user profile information including Profile ID, Display Name, Role Center ID, and Description using codeunit 9170 'Conf./Personalization Mgt.' in AL code, which provides more details than methods that only return the profile ID alone.

post Dynamics 365 Lab

Yun Zhu · 2025-10-31 · 152 words · about 1 min

"codeunit 9170 "Conf./Personalization Mgt."."

Key points

  • Use codeunit 9170 ‘Conf./Personalization Mgt.’ with its GetCurrentProfile procedure to access comprehensive profile data
  • This method returns the complete ‘All Profile’ record with multiple properties like Profile ID, Role Center ID, and Description
  • The approach goes beyond simpler methods that can only retrieve the profile ID without additional profile attributes
  • Practical implementation shown through a page extension example on Customer List page

Quotes

  • “codeunit 9170 “Conf./Personalization Mgt.”.” (Identifies the specific system codeunit developers should use to access comprehensive profile data)
  • “procedure GetCurrentProfile(var AllProfile: Record “All Profile”):” (Shows the exact method signature that retrieves the full profile record with all available properties)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

Not found in BC28-30: table “All Profile”.

No source states these links: they share an object, a model read them, or a person found the same subject.

Context

  • Features: Profile information retrieval, Role identification, Role Center access, User personalization management

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.