There's a predictable moment in every hand-built AI-to-SAP project. The prototype worked beautifully against a public demo service. Then someone points it at a real SAP Gateway URL, the first write comes back 403 Forbidden, and the afternoon project becomes a week of reading SAP community threads from 2014.
Nothing is broken. SAP is just enforcing rules that generic integration tooling has never heard of. If you're evaluating any AI integration for SAP — building or buying — these are the four quirks it must handle, and the questions to ask about each.
Quirk 1: The CSRF token dance
SAP Gateway rejects modifying requests (POST, PUT, PATCH, DELETE) unless they carry a valid CSRF token — and you can't just request one. The protocol is a dance:
- Send a
GET to the service with the header X-CSRF-Token: Fetch.
- Read the real token out of the response headers.
- Attach that token to your write request.
Simple — except for the sharp edges. The token comes back under inconsistent header casings depending on the SAP release (x-csrf-token, X-CSRF-Token, X-Csrf-Token), so naive header lookups miss it. Some systems answer the fetch with a 302 redirect you must tolerate rather than treat as failure. And tokens expire: a long-lived integration will eventually get a 403 mid-flight and must silently re-fetch and retry, not surface an error to the user asking the question.
An AI assistant makes this worse than a classic integration, because tool calls happen at conversation speed. A person will retry a failed form submit; an AI that gets a 403 will either give up or — worse — tell your user the update failed when it was one token-refresh away from succeeding.
Quirk 2: Session cookies travel with the token
Here's the part that catches even people who know about CSRF: the token is only half the credential. When SAP issues the token, it also sets session cookies — and the write must present the token and the cookies from the same exchange. A token stapled to a cookie-less request fails. Two requests load-balanced to different sessions fail intermittently, which is the most expensive kind of failure to debug.
Some SAP landscapes go further and use cookie-based sessions as the primary authentication — no Basic Auth accepted at all. Your integration needs cookie auth as a first-class option, not a workaround.
Quirk 3: OData v2 speaks a 2010 dialect
Most SAP Gateway services are OData v2, and v2 has opinions modern tooling has forgotten:
- Dates aren't dates. A v2 service returns
/Date(1720483200000)/ — epoch milliseconds in a string wrapper — where any current API returns ISO 8601. Feed that to an AI raw and you get answers like "the invoice is due on Date one-seven-two-zero…".
- Payloads are wrapped in noise. Every entity arrives with
__metadata and __deferred blocks, and result arrays hide inside a results wrapper. None of it helps answer a question; all of it burns context and confuses tool output.
- GUIDs need costumes. A filter on a GUID field must write
PropertyName eq guid'069f2c5e-…' — with the guid prefix and quotes — or the query fails. An AI generating filters from natural language will never guess that unless the layer rewrites it.
Quirk 4: Auth is plural
Across a real landscape you'll meet Basic Auth on one service, session cookies on another, and OAuth on a third — sometimes stored tokens, sometimes client-credentials flows that must refresh themselves. "We support username and password" is not SAP coverage. And wherever those credentials live, the one place they must never end up is inside the AI client's context.
The checklist, in one table
Why we're telling you the gory details
Because this table is the honest case for not building this yourself. Every row is code DataTether already runs in production — the CSRF manager with its retry logic, the cookie pairing, the date and GUID rewriting, the response cleaning that keeps tool output readable — so connecting a real SAP service is the same guided flow as connecting the Northwind demo, just with your auth type selected from a dropdown.
The value isn't that the quirks are hard individually. It's that your team shouldn't spend 2026 rediscovering 2014's SAP forum threads when the point of the project was getting Claude to answer questions from SAP.
If your integration attempt is currently stuck on any row of that table, request guided access — bring the failing service, and we'll have it answering questions in the same session.