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

How to get the current company which the current user is assigned to in Dynamics 365 Business Central?

(0) ShareShare
ReportReport
Posted on by 625

Hi All,

Since different users can be assigned to different company. I want to know the current company based on the current user that is logged into the sandbox.

Is there any i can achieve this through code?

Thank in Advance.

  • Suggested answer
    hyattmjh Profile Picture
    80 on at

    Not sure if I am understanding the questions fully, but

    Message(UserId + CurrentCompany);

    return the current userid and current company - is this what you are trying to acheive?

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    you can use commands currentcompany or companyname.

  • Community Member Profile Picture
    on at

    In Business Central online, the number of users is defined by the subscription and added to your tenant in the Microsoft Partner Center, typically by your Microsoft partner. For more information, see Add a new customer and Create, suspend, or cancel customer subscriptions in the Microsoft Partner Center help.

    To define who can sign in to Business Central, the product licenses must be assigned to users according to the roles that they will perform in Business Central. This can be done in the following ways:

    Your company's Office 365 administrator can do it in the Microsoft 365 Admin Center. For more information, see Add users individually or in bulk to Office 365.
    A Microsoft partner can assign licenses in the Microsoft 365 Business Admin Center or in the Microsoft Partner Center. For more information, see User management tasks for customer accounts in the Microsoft Partner Center help.

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

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 715 Super User 2026 Season 2

#2
AndrewThomas81 Profile Picture

AndrewThomas81 390 Super User 2026 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 386 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans