---
title: Resource and Company ID
description: These IDs are required for various commands.
---

[Skip to content](https://kb.opscompass.com/knowledge/cli/resource-company-id#main-content)

[![Opscompass](https://kb.opscompass.com/hubfs/opscompass-logo-2024-web-small.svg)](https://opscompass.com)

- [Home](https://opscompass.com/)
- [Why Opscompass](https://opscompass.com/why-opscompass/)
- Product
  
  Show submenu for Product

    - [Inventory](https://opscompass.com/inventory/)
    - [Configuration Drift](https://opscompass.com/product/configuration-drift/)
    - [Compliance](https://opscompass.com/product/compliance/)
    - [Licenses](https://opscompass.com/solutions/licenses/)
- Solutions
  
  Show submenu for Solutions

    - [Hybrid and Multi-Cloud Visibility](https://opscompass.com/solutions/multi-cloud-visibility/)
- [About Us](https://opscompass.com/company/)

Open main navigation

Close main navigation

- [Home](https://opscompass.com/)
- [Why Opscompass](https://opscompass.com/why-opscompass/)
- Product
  
  Show submenu for Product

    - [Inventory](https://opscompass.com/inventory/)
    - [Configuration Drift](https://opscompass.com/product/configuration-drift/)
    - [Compliance](https://opscompass.com/product/compliance/)
    - [Licenses](https://opscompass.com/solutions/licenses/)
- Solutions
  
  Show submenu for Solutions

    - [Hybrid and Multi-Cloud Visibility](https://opscompass.com/solutions/multi-cloud-visibility/)
- [About Us](https://opscompass.com/company/)
- [Get a Demo](https://opscompass.com/demo/)

[Get a Demo](https://opscompass.com/demo/)

 What are you looking for?

- There are no suggestions because the search field is empty.

1. [Help Center](https://kb.opscompass.com/knowledge)
2. [Opscompass CLI](https://kb.opscompass.com/knowledge/opscompass-cli)
3. [Getting Started](https://kb.opscompass.com/knowledge/opscompass-cli#getting-started)

# Resource and Company ID

## These IDs are required for various commands.

#### Getting Details of a Resource

You'll need a couple pieces of information to get the details of a single resource using the CLI. You'll need the company the resource is associated with and an identifier for the resource.

### <https://kb.opscompass.com/knowledge/opscompass-command-line-interface#company-id>Company ID

If you want to get details of a resource, you'll need to know your company's ID in OpsCompass. You can get this by logging into OpsCompass. Your company will be in the URL.

For instance, if you're viewing the Inventory page, your URL will be:

```
https://app.opscompass.com/your_company_id/inventory
```

Here, the company id is your\_company\_id.

### <https://kb.opscompass.com/knowledge/opscompass-command-line-interface#resource-id>Resource ID

You'll also need to provide the ID of the resource you're trying to access. You can get this in two ways: from the cloud and from OpsCompass.

Each cloud has a different way to uniquely identify resources. For instance, Azure uses "Resource ID" and AWS uses "ARN".

When you have the cloud's ID for a resource, provide that with "--resource-id".

```
opscompass resources get --company your_company_id --resource-id "/subscriptions/abcdef00-0000-4000-a000-123456781234/resourceGroups/A-Resource-Group/providers/Microsoft.Web/sites/yoursite"
```

When you load a resource's details in the OpsCompass web experience, you'll see the resource's "OpsCompass ID" at the end of the URL. As we add more capabilities to search your resources using the CLI, this ID will be available through command output.

```
https://app.opscompass.com/your_company_id/inventory/1234567
```

Here, the OpsCompass ID of the resource is 1234567. When you have the OpsCompass ID for a resource, provide it with "--id"

```
opscompass resources get --company your_company_id --id 1234567
```

- [About Opscompass](https://kb.opscompass.com/knowledge/about-opscompass#main-content)

    - [Company Information](https://kb.opscompass.com/knowledge/about-opscompass#company-information)
- [Getting Started](https://kb.opscompass.com/knowledge/getting-started#main-content)

    - [Logging In](https://kb.opscompass.com/knowledge/getting-started#logging-in)
    - [Connecting Cloud Accounts](https://kb.opscompass.com/knowledge/getting-started#connecting-cloud-accounts)
    - [Users and Teams](https://kb.opscompass.com/knowledge/getting-started#users-and-teams)
- [Opscompass CLI](https://kb.opscompass.com/knowledge/opscompass-cli#main-content)

    - [Getting Started](https://kb.opscompass.com/knowledge/opscompass-cli#getting-started)
    - [Resources](https://kb.opscompass.com/knowledge/opscompass-cli#resources)
    - [Accounts](https://kb.opscompass.com/knowledge/opscompass-cli#accounts)
    - [Compliance](https://kb.opscompass.com/knowledge/opscompass-cli#compliance)
    - [Licensing](https://kb.opscompass.com/knowledge/opscompass-cli#licensing)
    - [Examples](https://kb.opscompass.com/knowledge/opscompass-cli#examples)
    - [AI Skills](https://kb.opscompass.com/knowledge/opscompass-cli#ai-skills)
- [Opscompass FAQs](https://kb.opscompass.com/knowledge/opscompass-faqs#main-content)

    - [General](https://kb.opscompass.com/knowledge/opscompass-faqs#general)
- [New Features](https://kb.opscompass.com/knowledge/new-features)
- [Account Management](https://kb.opscompass.com/knowledge/account-management)
- [Compliance](https://kb.opscompass.com/knowledge/compliance)
- [Documents](https://kb.opscompass.com/knowledge/documents)
- [Drift](https://kb.opscompass.com/knowledge/drift)
- [Inventory](https://kb.opscompass.com/knowledge/inventory)
- [Licenses](https://kb.opscompass.com/knowledge/licenses#main-content)

    - [Oracle](https://kb.opscompass.com/knowledge/licenses#oracle)
    - [SQL Server](https://kb.opscompass.com/knowledge/licenses#sql-server)
- [Navigation and Dashboard](https://kb.opscompass.com/knowledge/navigation-and-dashboard)
- [Opscompass Integrations](https://kb.opscompass.com/knowledge/opscompass-integrations)
- [Tutorials](https://kb.opscompass.com/knowledge/tutorials#main-content)

    - [CLI](https://kb.opscompass.com/knowledge/tutorials#cli)

[![Opscompass](https://kb.opscompass.com/hubfs/opscompass-logo-2024-web-small.svg "Opscompass")](http://opscompass.com)

<https://opscompass.com/contact/> <https://www.linkedin.com/company/opscompass/>

Copyright © 2025, Opscompass