Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article describes how to set up Postman and test your Microsoft Entra app registration with a simple GET-request.

This article consists of two steps:

  • Add an OData REST API "Customers" in your BC Environment

  • Set up Postman and perform an OData GET request on this REST API

Info

Postman is an API platform for building and using APIs. You can get started for free with Postman. BriteBlue is not affiliated with Postman or any of its brands.

Add an OData REST API "Customers" in your BC Environment

  1. In the Business Central client, search for Web Services and open the page.

  2. Click on New

    1. Object Type = Page

    2. Object ID = 22

    3. Service Name = Customers

    4. Make sure to tick the box “Published”

image-20240731-185221.pngImage Added
Add a BC OData REST-API Webservice

Set up Postman and perform an OData GET request

  1. Get started with Postman

    1. This can either be the desktop application of Postman: https://www.postman.com/downloads/

    2. Or the browser interface of Postman: https://go.postman.co/

  2. Create an account with Postman: https://identity.getpostman.com/signup

Note

While it's not necessary to create an account to use Postman, we encourage it so you can backup your work automatically to the Postman Cloud.

  1. Download this example Postman collection:

Panel
panelIconId1f4c1
panelIcon:file_folder:
panelIconText📁
bgColor#F4F5F7

View file
nameBriteBlue Postman Example.postman_collection.json

  1. Open Postman and Import the downloaded Postman collection

image-20240731-185430.pngImage Added
Import the example Postman collection
  1. Select the top level of the Postman collection, name BriteBlue Postman Example

  2. Select tab Variables and edit the Variables in columns “Initial value” and “Current value”

    1. Entra_Tenant_ID = Your Microsoft Entra Tenant ID (hint: this can be copied from your BC URL)

    2. Client_ID = The Client ID as created during Register a Dynamics 365 Business Central Application in Azure

    3. Client_Secret = The Client Secret as created during Register a Dynamics 365 Business Central Application in Azure

    4. BC_Environment = The name of the BC Environment in which you’ve added the webservice earlier (hint: this can be copied from your BC URL)

    5. BC_Company = Your BC Company name (hint: this can be copied from your BC URL)

image-20240731-185057.pngImage Added
Adjust the variables to those of your BC environment
  1. Select tab Authorization

  2. Scroll down and select Get New Access Token

Info

Business Central Tokens expire after 60 minutes / 1 hour.

image-20240731-185811.pngImage Added
image-20240731-185609.pngImage Added
Retrieve Access Token
  1. Click Use token

image-20240731-185933.pngImage Added
Make sure to select Use Token to apply the token
  1. Open request GetCustomers

  2. Click Send. It may take a couple of seconds before Business Central responds and Postman has “Pretty printed” the result

Tip

Congratulations, you’ve just succesfully retrieved data from your Business Central environment!

image-20240731-190812.pngImage Added
Result from the GET-request GetCustomers