🔐 Prerequisites
Before you begin, ensure you have the following setup:
-
✅ Postman installed
-
✅ Your Azure Tenant ID
-
✅ Registered Client ID (App ID)
-
✅ Client Secret value
-
✅ D365 F&O environment URL
🏗️ Register Your App in D365FO
-
Navigate to:
System administration → Setup → Microsoft Entra ID applications -
Click New, then enter:
-
App ID → Your Client ID from Azure
-
Name → Any friendly display name
-
User ID → A user with relevant security permissions (e.g.,
Admin
)
🔑 Step 1: Acquire Access Token in Postman
Method: POST
URL:
🔸 Headers Tab
Set these headers (most are defaults):
Key | Value |
---|---|
Host | login.microsoftonline.com |
Content-Type | application/x-www-form-urlencoded |
🔸 Body Tab (x-www-form-urlencoded)
Key | Value (example) |
---|---|
client_id | YOUR_CLIENT_ID |
client_secret | YOUR_CLIENT_SECRET |
grant_type | client_credentials |
scope | https://YOUR_ENVIRONMENT_URL/.default |
➡️ Click Send and you’ll receive an access token in the response. This token will be used in subsequent OData calls.
🔄 Step 2: Call OData Endpoints
Use the token received above in Authorization tab → Type = Bearer Token
.
✅ GET: Read Data
Retrieve records from a data entity:
➕ POST: Insert a Record
Create a new record (e.g., Sales order):
📝 PATCH: Update a Record
Update fields in an existing record:
❌ DELETE: Remove a Record
Delete a record by key:
🧩 Expand and Filter Data (Advanced Querying)
Use $expand
and $select
to fetch related records and specific fields:
📚 Reference
-
Microsoft Docs:
OData in D365FO
(Official source for all OData authentication, metadata, and usage patterns)
✅ Summary
You’ve now seen how to:
-
Register an app in D365FO
-
Use Postman to acquire an access token
-
Perform CRUD operations on D365 F&O OData endpoints
-
Use advanced querying features like
$expand
and$select
This setup is essential for integrating external systems or building custom apps that connect to Dynamics 365 data securely.
0 Comments