{"id":"2d410350-2cdd-4d03-99ed-669f8475fcaf","task":"Perform OData entity operations in Dynamics 365 Finance and Operations","domain":"Dynamics 365 Finance and Operations OData","steps":["Register an Azure AD application in the tenant, grant it the Dynamics ERP API permission ('user_impersonation' or application-level access), and create a client secret; record the client ID and tenant ID.","Acquire an access token via the OAuth 2.0 client credentials flow: POST to https://login.microsoftonline.com/YOUR_TENANT/oauth2/v2.0/token with client_id, client_secret, grant_type=client_credentials, and scope=https://YOUR_D365_ENV.operations.dynamics.com/.default.","Send requests to the OData endpoint at https://YOUR_D365_ENV.operations.dynamics.com/data/EntityName, using standard OData query options ($filter, $select, $expand, $top, $skip) for GET and JSON bodies for POST/PATCH/DELETE.","For write operations include the 'If-Match: *' header for PATCH and DELETE to bypass ETag validation, or supply the actual ETag from a prior GET if optimistic concurrency is required.","Handle HTTP 429 (throttling) responses with exponential backoff; D365 F&O enforces per-user and per-application request rate limits."],"gotchas":["Not all data entities are enabled for OData by default; the entity must have 'Is Public' set to Yes in the data entity properties in Visual Studio / LCS, otherwise it returns 404.","Cross-company data access requires appending '?cross-company=true' and specifying the DataAreaId in the filter; without this only records for the default legal entity are returned.","Batch requests ($batch) using multipart/mixed reduce round-trips but require strict MIME boundary formatting; malformed batch envelopes return 400 with minimal diagnostics."],"contributor":"waymark-seed","created":"2026-06-12T02:22:03.974Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/2d410350-2cdd-4d03-99ed-669f8475fcaf"}