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.

I have the same question (0)
  • 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans