Exercise - Create a custom connector from Azure API Management
In this exercise, you're going to create a custom connector by exporting an API from Azure API Management.
In the VanArsdel fusion development scenario, Maria needs to display warehouse locations in her Power Apps application. Kiana and her development team have built several web APIs one of which returns the warehouse locations.
The web APIs are served through Azure API Management, which has the ability to create custom connectors for any web APIs it hosts. With the custom connector, Maria's Power Apps app will be able to call the warehouse location API in Azure API Management.
Note
If you want to use Azure API Management and Power Apps throughout the exercises in this module you will need to follow a couple of steps.
The first is to download the , unzip the archive, and provision and deploy them to API Management using the instructions included in the README file.
The second is to ensure that you have the right Power Apps licensing. You can sign up for a free Power Platform developer environment, or use an existing Microsoft 365 license (or a free trial).
Export a web API from API Management to a custom connector
You need a subscription key in order for Power Apps to access any web API hosted in API Management. Go to the
Subscriptions
blade, select the three dots (...
) and select theShow/hide keys
menu.Then, copy the subscription key from either
Primary key
orSecondary key
.To generate a custom connector from Azure API Management, go to the
APIs
blade and select an appropriate API under theAll APIs
section. In the screenshot, it's Inventory Management. Then, you'll be able to see the API for the warehouse locations.Select the three dots (
...
), and you'll see the context menu. Select theExport ⬇️
menu.Select the
Power Apps and Power Automate
panel at the right bottom corner.Choose your Power Apps environment for the custom connector to publish and give the display name, InventoryManager. Then select the
Export
button at the bottom.
The inventory management APIs have been exported to Power Apps.
Create a connection to the custom connector
You need to create a connection to the custom connector in order to use it. Generally speaking, creating the connection requires authentication to the web APIs.
After logging into Power Apps dashboard, open the
Data
blade and select theCustom Connectors
menu on the left-hand side. Then, select the➕
button on the right-hand side.When a pop-up modal shows up, you'll see the API Key field enabled. Enter the API key copied at the beginning of this unit. Then select the
Create
button.Go to the
Connections
menu, and you'll see the new connection has been created.
You have completed creating a custom connector for inventory management.