Skip to content
datasquares.aiSign inStart free

Connect DataDeveloper & APIs

OData

OData is in Preview in the connection wizard: it is built on OData’s documented API and has not yet been proven against a live account, so check the imported tables before relying on them. OData V4 services on a public HTTPS service root. Each entity set you pick becomes a table, read in full on every refresh; singletons and functions are skipped.

  1. In DataSquares, open Data Sources and choose Connect Source. The Connect a data source page opens.

  2. Pick OData on that page (search or browse by category).

  3. Fill in the connection details below, then test the connection and save.

Field What to enter
Service root URL The OData V4 service root — the address whose response lists the entity sets. e.g. https://services.odata.org/V4/TripPinServiceRW
Sign in with One of: No sign-in (a public service) (the default), User name and password, Bearer token, OAuth 2.0 client credentials.
User name Only with User name and password.
Password Stored encrypted and never shown again. Only with User name and password.
Bearer token Sent on every request as Authorization: Bearer <token>. Stored encrypted and never shown again. Only with Bearer token.
Token URL Your identity provider’s OAuth 2.0 token endpoint (https). e.g. https://login.microsoftonline.com/<tenant id>/oauth2/v2.0/token Only with OAuth 2.0 client credentials.
Client ID Only with OAuth 2.0 client credentials.
Client secret Stored encrypted and never shown again. Only with OAuth 2.0 client credentials.
Scope Space-separated, if your provider asks for one — for Microsoft Entra, the service’s address followed by /.default. e.g. https://api.businesscentral.dynamics.com/.default Optional. Only with OAuth 2.0 client credentials.
SAP client SAP Gateway only: the three-digit client, sent as the sap-client header. e.g. 100 Optional.

Test Connection lists the tables with these values; nothing is saved until you import.

Pick the tables to import — each one becomes a table in the source:

Find tables lists the tables OData offers (up to 10,000); nothing is picked to begin with. Search the list and pick the ones you want — Select all, or Select N matching while you search, picks every table the search shows — and each one you pick becomes a table named after it; one source imports up to 200 of them. A refresh reads the same tables under the same names. A table is known by its name, so one that is renamed or removed at the source fails the refresh, naming it.

OData annotations — @odata.etag, @odata.id, navigation links and the like — are left out at every depth, so no column carries one; a value the service also sends formatted for display arrives beside it as <column>_label.

Every table is read through all of its pages, nested fields become parent.child columns, and the whole set is imported at once: the import’s row and size limits count the picked tables together, and if they pass one, nothing is imported and the message says which table and which limit. Refresh the source on a schedule, or by hand, to re-read every table; a table that comes back empty is refused rather than emptied unless you allow it. Nothing is ever written to OData.

The requests follow OData’s API reference.

The connector reads OData V4 services in their JSON format: a response lists its rows in value and points to the next page with @odata.nextLink. Each entity set the service root lists can become a table. Singletons, functions, actions and nested service documents are skipped.

It does not read OData V2 services, which return d.results and page with __next. Many SAP S/4HANA API_… services and SAP SuccessFactors are V2: use a service’s V4 version where one exists.

The Service root URL is the address whose response lists the entity sets (the service document). Open it in a browser: an OData V4 service answers with JSON holding a value list of names. For example:

Service Service root
A public demo (no sign-in) https://services.odata.org/V4/Northwind/Northwind.svc
Microsoft Graph https://graph.microsoft.com/v1.0
Dynamics 365 Finance and Operations https://<environment>.operations.dynamics.com/data
SAP Gateway (S/4HANA, OData V4) https://<host>/sap/opu/odata4/sap/<service group>/srvd_a2x/sap/<service>/0001
SAP Cloud Application Programming Model https://<app host>/odata/v4/<service>

The address must use https on a host the internet can reach; a service on a private network or behind a VPN is refused. It takes no query string. A service root that redirects (some services put a session key in the path) is refused with the address it redirects to: enter that address instead.

For Microsoft Dataverse tables (Dynamics 365 Sales, Customer Service, Power Apps), use the Microsoft Dynamics 365 connector, which also brings each choice and lookup column’s display text.

Sign in with picks one of four ways in, and the form asks only for that way’s fields:

Way in What DataSquares sends
No sign-in (a public service) No credential, for open services such as the demo above.
User name and password HTTP basic authentication on every request, for example as an SAP Gateway technical user.
Bearer token Authorization: Bearer <token> on every request, with a token you already have. When it expires, the refresh fails and says so; give the source a new token with Update credentials (when a refresh fails).
OAuth 2.0 client credentials Each time DataSquares reads the service (a test, Find tables, an import or a refresh), your app’s Client ID and Client secret first buy an access token at your identity provider’s Token URL; every request then carries it, and a long import or refresh buys a new one before the next page when it is about to expire, even part-way through a set. The access token is never stored.

The Token URL must use https on a public host, like the service root. The client ID and secret go to it in the request body (client_secret_post); an identity provider that accepts only HTTP basic client authentication refuses them.

Update credentials keeps a saved password, bearer token or client secret that you leave empty, but only while the Service root URL and the Token URL stay as they are: a saved secret is only ever sent to the address it was saved for. Change either address and type the secrets again.

Microsoft Entra: Graph, Finance and Operations

Section titled “Microsoft Entra: Graph, Finance and Operations”
  1. In the Microsoft Entra admin center, register an app under App registrations and add a client secret under Certificates & secrets.

  2. Give the app read access to the service:

    • Microsoft Graph: add the application permissions the tables need (for example User.Read.All for users), then grant admin consent.
    • Finance and Operations: add the app’s client ID under System administration → Setup → Microsoft Entra applications, mapped to a user whose roles can read the data entities.
  3. In the form, choose OAuth 2.0 client credentials and enter:

    • Token URL: https://login.microsoftonline.com/<tenant id>/oauth2/v2.0/token
    • Client ID and Client secret: the app’s.
    • Scope: the service’s address followed by /.default, such as https://graph.microsoft.com/.default or https://<environment>.operations.dynamics.com/.default.

Choose User name and password with a technical user that can read the service. When the system has more than one client, enter the three-digit SAP client: it is sent as the sap-client header on every request.

  • Entity sets at the service root only. Sets a service keeps under another entity are not read; Business Central’s API, for example, puts its tables under each company (companies(…)/customers). An entity set whose name uses characters other than letters A–Z, digits and _ is not listed.
  • Up to 10,000 entity sets. A service that lists more is refused rather than listed in part. One source imports up to 200 of them; add another source for more.
  • Next links stay on the service’s own host. The service decides its page size (DataSquares asks for up to 1,000 rows a page) and every @odata.nextLink is followed, whether absolute or relative. A next link to another host is refused, and nothing is imported.
  • A full read on every refresh. There is no change tracking: every refresh reads every picked set again, so a large set takes as long each time. The import’s row and size limits count every picked set together: an import or a refresh that passes one stops at the set that passes it and is refused, never cut.
  • Throttling. A service that answers HTTP 429 or 503 is waited for as its Retry-After asks, briefly; a longer wait fails the refresh and says when to try again.
  • A short read cannot be detected. A service that stops sending rows without a next link looks complete. The first time, compare a table’s row count with the service’s own (<set>/$count).