top of page
  • Writer's pictureDragos Mihai

How To Find Salesforce Org Id?

Updated: Aug 17, 2023

How to find salesforce org id? Salesforce is a widely used customer relationship management (CRM) system that offers businesses a comprehensive platform for managing their sales, marketing, and customer service activities. Salesforce assigns a unique identifier to each organization that uses its platform, known as the org ID.


This org ID is a crucial piece of information that is often required for troubleshooting and debugging purposes, as well as for integrating Salesforce with other systems. In this article, we will discuss various ways to find the Salesforce org ID.

Method 1: From the URL

One of the simplest ways you can try if you have a query: how to find org id in salesforce? Just logged into your Salesforce account. The org ID is a 15-character alphanumeric code that appears at the end of the URL, right after the “/” symbol. For example, if your Salesforce URL is, then your org ID is “na1” which is the server name followed by the 15-digit unique ID.

If you are using a custom domain for your Salesforce instance, the org ID may not be visible in the URL. In this case, you can go to the setup menu by clicking on the gear icon in the top right corner of the screen and selecting “Setup”.

Once you are on the setup page, you can find your org ID at the top of the page next to your organization name.

Method 2: From the Company Information page

Another way to find your Salesforce org ID is by accessing the Company Information page. This page provides a wealth of information about your organization, including your org ID, company name, address, and phone number. To access the Company Information page, you need to follow these steps:

  • Click on the gear icon in the top right corner of the screen and select “Setup”.

  • In the left sidebar, click on “Company Information” under the “Company Settings” section.

  • The org ID is listed at the top of the page next to the organization name.

Method 3: From the Salesforce Mobile App

If you are using the Salesforce mobile app, you can easily find your org ID by following these steps:

  • Open the Salesforce mobile app on your mobile device.

  • Tap on the hamburger icon in the top left corner of the screen to open the navigation menu.

  • Tap on your name or profile picture to open your profile.

  • The org ID is listed at the bottom of the screen.

Method 4: From the API

If you have access to Salesforce APIs, you can easily find your Salesforce Org ID programmatically. Here's how you can do it using the Salesforce REST API:

Get your Salesforce access token using OAuth 2.0 authentication. You can use any OAuth 2.0 client library for your programming language to authenticate and obtain the access token.

Use the following REST API endpoint to get your Org ID:

GET /services/data/vXX.X/sobjects/Organization/

Replace the "vXX.X" with the version of Salesforce API that you want to use. For example, if you want to use API version 51.0, the endpoint will be:

GET /services/data/v51.0/sobjects/Organization/

Add the access token to the request headers. The "Authorization" header should have the value "Bearer <access_token>". Replace "<access_token>" with your actual access token.


Authorization: Bearer <access_token>

Send a GET request to the endpoint using your preferred HTTP client. Here's an example in Python:

import requests

# Set the API endpoint

url = ""

# Set the request headers

headers = {

"Authorization": "Bearer <access_token>"


# Send the GET request

response = requests.get(url, headers=headers)

# Get the Org ID from the response JSON

org_id = response.json()["Id"]

Replace "yourinstance" with your Salesforce instance name and "<access_token>" with your actual access token.

The Org ID will be returned in the response JSON. You can access the Org ID using the "Id" key of the JSON object.

Method 5: From the Email Footer

If you are using Salesforce to send emails to your customers or clients, your org ID may be included in the email footer. This is particularly true if you are using the Salesforce Email Marketing tool.

The org ID is usually listed in the footer along with other important details, such as the sender’s name, email address, and physical address. If you are not sure whether your org ID is included in the email footer, you can check the email template that you are using for your emails.

Frequently Asked Questions:

What is Salesforce Org Id?

Salesforce Org Id is a unique identifier assigned to each instance of the Salesforce platform. It is a 15-character alphanumeric string that is used to differentiate one Salesforce organization from another.

When a new Salesforce instance is created, a unique Org Id is generated and assigned to that instance. This Org Id is used to identify the instance in various Salesforce features, such as API calls, web services, and security settings.

The Org Id is typically used by Salesforce administrators and developers to manage and develop applications within the instance, and it is often required when integrating Salesforce with external systems or applications. It can be found in the "Company Information" section of the Salesforce Setup menu, and can also be accessed via the Salesforce API or the Developer Console.

How To Use Salesforce?

Salesforce is a customer relationship management (CRM) platform that offers a wide range of tools and features to help businesses manage their customer interactions, sales processes, and marketing activities.

How to get org name in Salesforce Apex

In Salesforce Apex, you can get the organization name using the Organization class. The organization name can be retrieved using the getName() method of the Organization class.

Here's an example code snippet that demonstrates how to get the organization name in Salesforce Apex:

String orgName = [SELECT Name FROM Organization LIMIT 1].Name;

System.debug('Organization Name: ' + orgName);

In this code snippet, the SELECT query retrieves the name of the organization from the Organization object. The LIMIT 1 clause is used to ensure that only one record is returned.

The retrieved organization name is stored in a variable called orgName, which is then printed using the System.debug() method. You can use this code snippet in your Apex class to get the organization name in Salesforce.

Why Salesforce is the Best CRM?

Salesforce is widely considered one of the best customer relationship management (CRM) platforms for several reasons:

Customization: Salesforce offers a wide range of customization options, allowing businesses to tailor the platform to their specific needs. This makes it a highly versatile platform that can adapt to the needs of businesses of all sizes and industries.

User-friendly: Salesforce has a user-friendly interface that is easy to navigate, making it accessible to both technical and non-technical users.

Scalability: Salesforce can scale as your business grows, allowing you to add new users, features, and integrations as needed.

Integration: Salesforce can easily integrate with other business applications, such as marketing automation, accounting software, and social media platforms, allowing businesses to streamline their processes and workflows.

Data Management: Salesforce offers robust data management capabilities, providing businesses with a comprehensive view of their customers, including their purchase history, preferences, and behavior.

Security: Salesforce is known for its strong security measures, ensuring that your data is protected at all times.

Customer Support: Salesforce has a robust support system, offering users access to a knowledge base, online resources, and a community of users who can help troubleshoot issues.


So, if you have query: How to Find Salesforce Org Id? Then you can learn all methods as mentioned in this blog. Finding your Salesforce Org ID is a straightforward process that can be accomplished using various methods, depending on your level of access and technical expertise.

By knowing your Org ID, you can ensure that you have the necessary information to troubleshoot issues, request support from Salesforce, and integrate with third-party applications.

13 views0 comments

Recent Posts

See All

Get a Free Consultancy

bottom of page