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

Notifications

Announcements

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

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)
  • v-xida-msft Profile Picture
    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,
  • RajYRaman Profile Picture
    270 on at

    @Anonymous- This works in model driven app.

    Xrm.Utility.getGlobalContext().organizationSettings.organizationId

     

  • 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.

      

  • 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 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 403

#2
WarrenBelz Profile Picture

WarrenBelz 338 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 320 Super User 2025 Season 2

Last 30 days Overall leaderboard