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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Acces organizationid w...
Power Apps
Answered

Acces organizationid within PCF

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi 

 

I'm building some PCF's for Dynamics 365 CE. 
One of the issues I encountered is the need to acces the organizationId from where the pcf is currently running. 

I found it to be available inside the context-input : 

Context.mode.orgSettings._customControlExposedOrgSettings.organizationId

 

Will this be supported in the future? 

I have the same question (0)
  • Verified answer
    Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @Anonymous ,

    I couldn't found the organizationid in the context, but you can still add the webAPI feature to your PCF and make a supported request for that:

    context.webAPI.retrieveMultipleRecords("organization", "?$select=organizationid")
    .then((resp) => resp.entities[0].organizationid)
    .catch(console.error)

    Best regards,

    Diana 

  • Danish N. Profile Picture
    186 on at

    @Anonymous 

    I was able to find the organizationId here:

    context.orgSettings._customControlExposedOrgSettings.organizationId

    But as it is not documented and also the way it is named I don't think it will be supported in future. In case it gets exposed, most probably it will get refactored under some other property.


    ----
    Danish Naglekar | Power Maverick
    If this post helps, then please consider Accept it as the solution to help the other members.

      

  • RajYRaman Profile Picture
    270 on at

    @Anonymous- This works in model driven app.

    Xrm.Utility.getGlobalContext().organizationSettings.organizationId

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    I agree with  @DianaBirkelbach 's thought almost. You could use the the context.webAPI.retrieveMultipleRecords() Client API could achieve your needs.

     
    Please check the following article for more details:
     
    In addition, I also find the orgSettings feature under the context, but the orgSettings feature is not released under PowerApps Component Framework currently.
     
    Best regards,

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard