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
In the Business Central client, search for Web Services and open the page.
Click on New
Object Type = Page
Object ID = 22
Service Name = Customers
Make sure to tick the box “Published”
Add a BC OData REST-API Webservice |
Set up Postman and perform an OData GET request
Get started with Postman
This can either be the desktop application of Postman: https://www.postman.com/downloads/
Or the browser interface of Postman: https://go.postman.co/
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. |
Download this example Postman collection:
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
Open Postman and Import the downloaded Postman collection
Import the example Postman collection |
Select the top level of the Postman collection, name BriteBlue Postman Example
Select tab Variables and edit the Variables in columns “Initial value” and “Current value”
Entra_Tenant_ID = Your Microsoft Entra Tenant ID (hint: this can be copied from your BC URL)
Client_ID = The Client ID as created during Register a Dynamics 365 Business Central Application in Azure
Client_Secret = The Client Secret as created during Register a Dynamics 365 Business Central Application in Azure
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)
BC_Company = Your BC Company name (hint: this can be copied from your BC URL)
Adjust the variables to those of your BC environment |
Select tab Authorization
Scroll down and select Get New Access Token
Info |
---|
Business Central Tokens expire after 60 minutes / 1 hour. |
Retrieve Access Token |
Click Use token
Make sure to select Use Token to apply the token |
Open request GetCustomers
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! |
Result from the GET-request GetCustomers |