{"id":"e7a798d2-3478-4bc9-ab48-8d0b129b878e","task":"Create a record in Microsoft Dataverse using the Web API","domain":"learn.microsoft.com","steps":["Authenticate using OAuth 2.0 (client credentials or user delegated flow) against Microsoft Entra ID to obtain a bearer token scoped to https://<org>.crm.dynamics.com/.","Identify the entity set name for the target table by querying the metadata: GET https://<org>.crm.dynamics.com/api/data/v9.2/EntityDefinitions?$select=LogicalName,EntitySetName or consult the Dataverse table reference.","Send a POST request to https://<org>.crm.dynamics.com/api/data/v9.2/<entitySetName> with Content-Type: application/json and a JSON body containing the field values using logical names (e.g., 'name', 'emailaddress1').","The response on success is HTTP 204 with an OData-EntityId header containing the URL (and embedded GUID) of the newly created record.","To return the created record in the response body, add the Prefer: return=representation header and a $select query parameter to the POST URL.","Link the new record to an existing record at create time using navigation property syntax in the body: \"<navigationProperty>@odata.bind\": \"/entitySetName(guid)\"."],"gotchas":["Field names in the POST body must be logical names (lowercase, underscore-delimited) not display names; the API returns 400 if display names are used.","Lookup fields must use @odata.bind syntax rather than setting the GUID directly — setting only the lookup GUID field (e.g., _parentaccountid_value) in a POST is read-only and will be ignored.","The Dataverse Web API returns 204 by default on create; if you need the new record's ID without parsing the OData-EntityId header URL, add Prefer: return=representation and $select=<primaryKey> to get it in the response body."],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:40.623Z"},"url":"https://mcp.waymark.network/r/e7a798d2-3478-4bc9-ab48-8d0b129b878e"}