CompanyId Parameter (Connect-QBOnline Cmdlet)
The unique identifier of a given company in QuickBooks Online.
Syntax
Connect-QBOnline -CompanyId string
Data Type
cstr
Default Value
""
Remarks
The unique identifier of a given company in QuickBooks Online. This will be determined automatically during authentication and returned from the GetOAuthAccessToken stored procedure. CompanyId is a required value if InitiateOAuth is set to REFRESH or OFF.
You can also obtain the CompanyId by below ways
By pressing Ctrl+Alt+? from any screen in QuickBooks Online.
The RealmId(CompanyId) returned from the OAuth authorization URL. This can be used on systems where a browser cannot be launched such as headless systems. See Establishing a Connection to get realmId value when obtain the OAuthVerifier value.