Access Data Entity using Postman D365 F&O
Table of Content:
Access Data Entity using Postman D365 F&O
Task:
write x++ code to access the odata url using http request then insert, update, delete . or write x++ code to consume OData service
Set up azure active directory - With App Registration
Step 1: in azure active directory you have to register one app and it will generate few fields like tenant id, client id, client secret.Set up azure active directory - With D365 F&O Portal
Step 2: then in d365 f&o platform you have to add a azure active directory client id with admin access as user id and to identify it you can give name like below.Secret Key: Copy it for configuration in postman.
You have to set up postman using Params and authorizations configuration:
Grant Type: Client Credentials
Access Token URL: https://login.microsoftonlinr.com/<tenant id>/oauth2/v2.0/Token
https://login.microsoftonline.com/722862f0-24b3-4d15-a4d8-1707a71affa0/oauth2/v2.0/Token
Client id: <you will get it from azure portal>
Example: - 1c813d50-e42d-4836-97f0-730980c369b6
Client secret: <you will get it from azure portal>
Example: - nZk8Q~JmEsD9DWwqgjho6bhuc8eZ0fBECwdMUaSW
Scope: https://lcsdevvm1890ab8b9309532daddevaos.axcloud.dynamics.com/.default
Client Authentication: send Client credential to body
Get: Records Using Data Entity
Post: using post you can insert data
JSON:{ "@odata.etag": "W/\"JzUyMTQ4Mzg5LDU2MzcxNTA1ODAn\"", "dataAreaId": "40", "Id": "2", "Occupation": "developer", "Name": "Rumman", "Gender": "Male", "Age": "60", "Address": "kolakta" }
Patch: You can update using Patch
Using patch you can update data.
Delete: Using delete you can delete selected records
Using delete you can delete selected records from database.
https://lcsdevvm1890ab8b9309532daddevaos.axcloud.dynamics.com/data/Populations(dataAreaId='40',Id='2')
{ "@odata.etag": "W/\"JzEsNTYzNzE1NDMyOSc=\"", "dataAreaId": "40", "Id": "1", "Occupation": "hello", "Name": "Rumman", "Gender": "Male", "Age": "60", "Address": "chh" }