{"id":633,"date":"2020-01-03T18:31:33","date_gmt":"2020-01-03T17:31:33","guid":{"rendered":"http:\/\/daxvisionerp.com\/?p=633"},"modified":"2025-10-27T08:15:25","modified_gmt":"2025-10-27T08:15:25","slug":"call-ax-data-entity-from-postman","status":"publish","type":"post","link":"https:\/\/daxvisionerp.com\/home\/call-ax-data-entity-from-postman\/","title":{"rendered":"How to call AX data entity from Postman"},"content":{"rendered":"\n<p>Here in this post I give hints about how to register an\napplication in Azure Active Directory, set the application access in AX and\nthen how to call AX data entity from Postman <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Register an application and give\nthe necessary API Permissions<\/h2>\n\n\n\n<p>Based on the information found in the following Microsoft docs, and with the support of our IT manager, I made the setup.<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/v1-oauth2-client-creds-grant-flow#client-credentials-grant-flow-diagram\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/v1-oauth2-client-creds-grant-flow#client-credentials-grant-flow-diagram<\/a><\/p>\n\n\n\n<p><br> <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/quickstart-register-app\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/quickstart-register-app<\/a><\/p>\n\n\n\n<p><br> <a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/supply-chain\/warehousing\/install-configure-warehousing-app#create-a-web-service-application-in-azure-active-directory\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.microsoft.com\/en-us\/dynamics365\/supply-chain\/warehousing\/install-configure-warehousing-app#create-a-web-service-application-in-azure-active-directory<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Azure App registration screens<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image.png\" alt=\"\" class=\"wp-image-638\"\/><figcaption class=\"wp-element-caption\">Azure Active Directory App registration<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-1.png\" alt=\"\" class=\"wp-image-639\"\/><figcaption class=\"wp-element-caption\">AAD App registration &#8211; Authentication<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-2.png\" alt=\"\" class=\"wp-image-640\"\/><figcaption class=\"wp-element-caption\"> AAD App registration &#8211;  API permissions<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-3.png\" alt=\"\" class=\"wp-image-641\"\/><figcaption class=\"wp-element-caption\"> AAD App registration &#8211;  Certificates and secrets<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">AX<\/h3>\n\n\n\n<p>Go to &#8216;System administration \/ Azure Active Directory applications &#8216;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-6.png\" alt=\"\" class=\"wp-image-644\"\/><figcaption class=\"wp-element-caption\">D365FO Azure Active Directory applications<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-5.png\" alt=\"\" class=\"wp-image-643\"\/><figcaption class=\"wp-element-caption\">D365FO New AAD application<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">In Postman<\/h2>\n\n\n\n<p>I am using the developer\nVM that can be downloaded from LCS site (Lifecycle Services), I have installed\nPostman on this DEV VM and my URL is \u2019<a href=\"https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com\" target=\"_blank\" rel=\"noopener\">https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com<\/a>\u2019. I will call data entities like for\nexample the Vendors for which the URL is \u2019https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com\/data\/Vendors\u2019.<\/p>\n\n\n\n<p>To prevent\ngetting the following SSL error, you need to modify one setting of Postman.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-7.png\" alt=\"\" class=\"wp-image-645\"\/><figcaption class=\"wp-element-caption\">The typical Postman SSL error<\/figcaption><\/figure>\n\n\n\n<p>\u201cCould not get any response<\/p>\n\n\n\n<p>There was an error connecting\nto&nbsp;https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com\/data\/Vendors.<\/p>\n\n\n\n<p>Why this might have happened:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2022 The\nserver couldn&#8217;t send a response:<\/p>\n\n\n\n<p>Ensure that the backend is working properly<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2022\nSelf-signed SSL certificates are being blocked:<\/p>\n\n\n\n<p>Fix this by turning off &#8216;SSL certificate verification&#8217;\nin&nbsp;Settings &gt; General<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2022 Proxy\nconfigured incorrectly<\/p>\n\n\n\n<p>Ensure that proxy is configured correctly in&nbsp;Settings\n&gt; Proxy<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2022\nRequest timeout:<\/p>\n\n\n\n<p>Change request timeout in&nbsp;Settings &gt; General\u201d<\/p>\n\n\n\n<p>Go to Settings\nand turn off SSL certificate verification,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-8.png\" alt=\"\" class=\"wp-image-646\"\/><figcaption class=\"wp-element-caption\">Postman settings<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-9.png\" alt=\"\" class=\"wp-image-647\"\/><figcaption class=\"wp-element-caption\">Postman settings &#8211; SSL certificate verification<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Environment variable setup<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-10.png\" alt=\"\" class=\"wp-image-648\"\/><figcaption class=\"wp-element-caption\">Postman &#8211; manage environments<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-11.png\" alt=\"\" class=\"wp-image-649\"\/><figcaption class=\"wp-element-caption\"> Postman &#8211; manage environments 2<\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2019client_id\u2019, \u2019client_secret\u2019 &amp; \u2019adid\u2019 come from Azure, from the AAD app registration<\/li>\n\n\n\n<li>\u2019appIdUri\u2019 is \u2019 <a href=\"https:\/\/login.microsoftonline.com\/common\/oauth2\/nativeclient\" target=\"_blank\" rel=\"noopener\">https:\/\/login.microsoftonline.com\/common\/oauth2\/nativeclient<\/a>\u2019<\/li>\n\n\n\n<li>\u2019authCode\u2019 will be generated and updated here in a later step, described below<\/li>\n\n\n\n<li>\u2019resource\u2019 is the URL of the local AX: <a href=\"https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com\" target=\"_blank\" rel=\"noopener\">https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com<\/a><\/li>\n\n\n\n<li>\u2019grant_type\u2019 is \u2019client_credentials\u2019<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Get the access token<\/h3>\n\n\n\n<p>To get the access\ntoken, set up the following in Postman and click send:<\/p>\n\n\n\n<p>POST &#8211; https:\/\/login.microsoftonline.com\/{{adId}}\/oauth2\/token<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-12.png\" alt=\"\" class=\"wp-image-650\"\/><figcaption class=\"wp-element-caption\">Postman &#8211; get access token 1<\/figcaption><\/figure>\n\n\n\n<p>After clicking send you should see something like this (don\u2019t forget to turn SSL verification off as I described above):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-13.png\" alt=\"\" class=\"wp-image-651\"\/><figcaption class=\"wp-element-caption\"> Postman &#8211; get access token 2<\/figcaption><\/figure>\n\n\n\n<p>Copy the access token and update the &#8216;authCode&#8217; variable with this long string. Remember that the token has an expiry, so you need to update it later. You could have a look at the values coded in the token (for example the expiry date) if you went to \u2019<a href=\"http:\/\/jwt.io\" target=\"_blank\" rel=\"noopener\">jwt.io<\/a>\u2019. Paste the text into the \u2019Encoded\u2019 textbox. Move your mouse over the values on the right in the \u2019Decoded\u2019 box and you will get a readable value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-14.png\" alt=\"\" class=\"wp-image-652\"\/><figcaption class=\"wp-element-caption\">JWT.IO &#8211; Token decoded<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Access the data entity from Postman<\/h3>\n\n\n\n<p>After this many setups, you can call <a href=\"https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com\/data\/Vendors\" target=\"_blank\" rel=\"noopener\">https:\/\/usnconeboxax1aos.cloud.onebox.dynamics.com\/data\/Vendors<\/a> by creating a get type request like on the screenshot below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-15.png\" alt=\"\" class=\"wp-image-653\"\/><figcaption class=\"wp-element-caption\">How to call AX data entity from Postman &#8211; Header<\/figcaption><\/figure>\n\n\n\n<p>Or without using\nvariable, you can paste the token directly to the \u2019Authorization\u2019 value box\nafter \u2019Bearer\u2019 and a space. Click \u2019send\u2019 and see the result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-16.png\" alt=\"\" class=\"wp-image-654\"\/><figcaption class=\"wp-element-caption\">How to call AX data entity from Postman &#8211; Result<\/figcaption><\/figure>\n\n\n\n<p>You can add a filter parameter for example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-17.png\" alt=\"\" class=\"wp-image-655\"\/><figcaption class=\"wp-element-caption\">How to call AX data entity from Postman  &#8211; Filter<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n<div class=\"taxonomy-post_tag wp-block-post-terms\"><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/aad\/\" rel=\"tag\">AAD<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/data-entity\/\" rel=\"tag\">Data entity<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/oauth\/\" rel=\"tag\">OAuth<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/odata\/\" rel=\"tag\">OData<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/postman\/\" rel=\"tag\">Postman<\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>Here in this post I give hints about how to register an application in Azure Active Directory, set the application access in AX and then how to call AX data entity from Postman Register an application and give the necessary API Permissions Based on the information found in the following Microsoft docs, and with the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"1080","footnotes":""},"categories":[19],"tags":[81,83,85,87,89],"class_list":["post-633","post","type-post","status-publish","format-standard","hentry","category-dynamics-365fo","tag-aad","tag-data-entity","tag-oauth","tag-odata","tag-postman"],"_links":{"self":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/comments?post=633"}],"version-history":[{"count":1,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/633\/revisions"}],"predecessor-version":[{"id":1389,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/633\/revisions\/1389"}],"wp:attachment":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/media?parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/categories?post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/tags?post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}