LegalEntities
Retrieves the legal entities defined for the company.
View-Specific Information
Company-Level Authentication Requirement
You can only query LegalEntities when AuthScheme is set to CompanyLevelAuth. The SAP Concur Legal Entity v4.1 API resolves the company from a company-level access token, so it rejects a user-level token with a 400 status and the message "This endpoint requires a company ID." No filter or connection property can supply the company identifier in place of that token.
When any other AuthScheme is in effect, the add-in fails the query before it sends the request and reports that LegalEntities requires CompanyLevelAuth.
Select
The add-in retrieves legal entities using the SAP Concur Legal Entity v4.1 API's search endpoint. The operators that the add-in can offload to the SAP Concur APIs differ by column:
- Id supports = only.
- Phone supports =, !=, and LIKE.
- Active, Name, ReferenceId, RegisteringOrganization, TaxId, Email, AddressStreetAddress, AddressLocality, AddressRegion, AddressPostalCode, and AddressCountry support = and !=.
The add-in processes filters that refer to CompanyId, Created, or LastModified client-side within the add-in. The search endpoint resolves the company from the company-level access token, so it does not accept companyId as a filter.
Even on a column listed above, the add-in processes a filter client-side in the following cases:
- The filter value contains a plus sign (+), which the SAP Concur search endpoint does not accept. This most often affects Phone numbers written in E.164 format, such as '+44-20-1234-5678'.
- A LIKE pattern is anything other than a prefix ('44%'), suffix ('%5678'), or contains ('%1234%') match. Patterns with interior wildcards, and the unrestricted pattern '%', are processed client-side.
For example, the add-in offloads the processing of the following queries to the SAP Concur APIs:
SELECT * FROM LegalEntities WHERE Id = 'le-660e8400-e29b-41d4-a716-446655440001'
SELECT * FROM LegalEntities WHERE Active = true AND AddressCountry = 'US'
SELECT * FROM LegalEntities WHERE Name != 'Contoso Ltd'
SELECT * FROM LegalEntities WHERE Phone LIKE '44%'
In contrast, the add-in processes the filters in the following queries client-side:
SELECT * FROM LegalEntities WHERE Id != 'le-660e8400-e29b-41d4-a716-446655440001'
SELECT * FROM LegalEntities WHERE CompanyId = 'bb312305-42ca-4d23-98f1-9e19913a12f3'
SELECT * FROM LegalEntities WHERE Name LIKE 'Acme%'
SELECT * FROM LegalEntities WHERE Phone = '+44-20-1234-5678'
Retrieving legal entities requires the company.legalentity.read OAuth scope.
Columns
| Name | Type | References | Description |
| Id [KEY] | String | The unique identifier of the legal entity. | |
| CompanyId | String | The unique identifier of the company that owns the legal entity. | |
| Active | Boolean | Indicates whether the legal entity is active. | |
| Name | String | The name of the legal entity. | |
| ReferenceId | String | The unique reference identifier of the legal entity. | |
| RegisteringOrganization | String | The organization that issued the legal entity's registration. | |
| TaxId | String | The tax identification number of the legal entity. | |
| String | The contact email address for the legal entity. | ||
| Phone | String | The contact phone number for the legal entity. | |
| AddressStreetAddress | String | The street address of the legal entity. | |
| AddressLocality | String | The city or locality of the legal entity's address. | |
| AddressRegion | String | The state or region of the legal entity's address. | |
| AddressPostalCode | String | The postal code of the legal entity's address. | |
| AddressCountry | String | The 2-letter ISO 3166-1 country code of the legal entity's address. | |
| Created | Datetime | The date and time the legal entity was created. | |
| LastModified | Datetime | The date and time the legal entity was last modified. |