Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

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

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.png
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

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:

  1. Open Postman and Import the downloaded Postman collection

image-20240731-185430.png
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”image-20240731-185055.png

    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.png
Adjust the variables to those of your BC environment
  1. Select tab Authorization

  2. Scroll down and select Get New Access Token

Business Central Tokens expire after 60 minutes / 1 hour.

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

image-20240731-185933.png
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

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

image-20240731-190812.png
Result from the GET-request GetCustomers
  • No labels