How to Set Up a Custom Connector in Power Apps for External APIs
You can create custom connectors in Power Apps to help your app communicate with external APIs. By choosing to create custom connectors, you tailor the integration to fit your specific needs and work style.
Connecting Power Apps to outside APIs offers real benefits:
You gain more options to modify complex workflows.
You can connect with other apps and enable real-time automation.
Your team can complete tasks faster by simplifying processes and updating data efficiently.
You enhance security and control through Azure Active Directory.
No coding expertise is required—you can easily create custom connectors by following simple steps and using helpful tools.
Key Takeaways
Custom connectors help you connect Power Apps to outside APIs. You do not need to write code. This makes your apps stronger and more useful.
You must have the right access, API info, and a premium license. These things help you use custom connectors safely and well.
Get your API login details and learn about endpoints first. This helps your connector work well and stay safe.
Use the Power Apps custom connector wizard to set up login steps. You can also pick actions and test your connector one step at a time.
Add your custom connector to apps to do tasks automatically. You can show live data and make workflows better with simple tools.
Prerequisites
Power Apps Access
You need to use Power Apps before you begin. Make sure you have a device and browser that work with it. The table below shows what you need for each platform:
You must have admin access to the Power Platform admin center. This helps you set up data rules and control who can use connectors. If you are not an admin, you cannot make or change custom connectors.
API Requirements
You need to collect information about the external API you want to use. Start by reading the API documentation. You should find these things:
Endpoint URLs for each function you want to use
Supported request methods (GET, POST, etc.)
Required headers and JSON formatting
Authentication methods (OAuth 2.0, API keys, Basic Authentication, or Bearer tokens)
Tip: Most APIs need things like a client ID, client secret, authorization URL, and token URL for OAuth 2.0. You will use these to make your connection safe.
Keep your API credentials private. Store them in a safe place, like Azure Key Vault, to keep them protected.
Licensing
Custom connectors are premium features in Power Apps. You need a premium license to use them with outside APIs. Standard Microsoft 365 licenses do not include this. The table below shows your choices:
A Power Apps premium license lets you use custom connectors in apps and flows started by Power Apps. If you want to use premium connectors in flows that run alone, you might need a Power Automate Premium license. Always check your license before you start.
Prepare the API
Get API Credentials
You need API credentials to connect Power Apps to an external API. Most APIs use authentication like API keys, OAuth 2.0, or Basic Authentication. You can get these credentials by doing a few simple things:
Go to the API provider’s website and look for the “Get Started” or “Developer” section.
Fill out a form with your name, email, and why you want to use the API.
Wait for the provider to approve you. They will send your API key or credentials by email.
Keep your API key in a safe place. Use Azure Key Vault to protect secrets and stop them from showing up in code or logs.
Tip: Never put your API credentials directly in your app or connector. Use safe storage and only let trusted people have access.
You set up authentication in Power Apps by typing in your credentials when you make the connector. Power Apps lets you use OAuth, API keys, and Basic Authentication. You must set up these options yourself to keep your connection safe.
Use safe authentication like OAuth if you can.
Check often to see who can use your credentials.
Only give people the access they really need to lower risks.
Review Endpoints
You need to know the API endpoints before making your custom connector. Endpoints are URLs that let your app send or get data. Each endpoint does something special, like getting user data or adding new records.
Start by reading the API documentation. Look for these things:
The main URL of the API (like:
https://api.example.com/v1
)A list of endpoints and what each one does
Which HTTP methods you can use (GET, POST, PUT, DELETE)
What parameters and request bodies you need
What kind of response you will get (most times it is JSON)
You can use a table to keep track of endpoint details:
Try out each endpoint with tools like Postman or the Power Apps custom connector wizard. Send test requests and look at the answers you get. Make sure your parameters and URLs are correct so you do not make mistakes.
Note: Always check that the API service is working and your internet is on before you test endpoints.
Create Custom Connectors
You can Create Custom Connectors in Power Apps to link your app to almost any outside API. This lets you decide how your app talks to other services. You can start from nothing or use an OpenAPI definition to help you go faster. The custom connector wizard shows you what to do at each step.
Start from Solutions or Data
There are two main ways to Create Custom Connectors. You can start in the Solutions area or in the Data section in Power Apps. Use Solutions if you want to keep your connector with other app parts. Use Data > Custom Connectors if you want to build fast.
From Solutions:
Log in to Power Apps.
Open or make a solution.
Click "New" and then "Custom Connector".
Pick "Create from blank" or "Import an OpenAPI file".
From Data:
Go to Data > Custom Connectors.
Click "New custom connector".
Choose "Create from blank", "Import an OpenAPI file", or "Import a Postman collection".
If you have an OpenAPI definition, you can bring it in. This file fills in many details for you, like the API host, base URL, authentication, and actions. Importing saves you time and helps you avoid mistakes. You can look over and change the connector after you import it.
Tip: OpenAPI definitions let you use and share connectors in different apps and places.
General Info
The first step in the wizard asks for some basic info. You need to give your connector a name, an icon, and a short description. You also set the scheme (usually HTTPS), the host (like api.example.com
), and the base URL (such as /v1
). These details help people know what your connector does.
Use a name and description that are easy to understand.
Pick an icon that fits the API’s job.
Make sure the host and base URL match the API docs.
Authentication
Next, you set up authentication. This step keeps your connection safe. Power Apps lets you pick from a few types:
API Key: You type in a key from the API provider. The connector sends this key in the header or query string.
Basic Authentication: You use a username and password.
OAuth 2.0: You connect using a safe token. This is common for new APIs.
Service Principal (Client Credentials): You use Azure AD app registration for safe, automatic access.
You can only pick one authentication type for each connector. Choose the one your API uses. For example, if your API uses OAuth 2.0, you will need the client ID, client secret, authorization URL, and token URL.
Note: Service Principal authentication is best for automatic access. It uses Azure AD and does not need user passwords.
Define Actions
Now you set what your connector can do. Each action matches an API endpoint. You need to give each action a summary, a description, and an operation ID. Use names that make it clear what each action does.
Follow these steps to set actions:
Click "New Action" in the wizard.
Write a summary and description. Say what the action does.
Set the operation ID. Make sure it is unique.
Pick the HTTP method (GET, POST, PUT, DELETE).
Type the endpoint URL.
Add parameters. Mark them as needed or optional.
Import a sample request and response. This helps Power Apps know the data.
Check that parameter types match the API (like using integer for numbers).
Add links to the API docs if you can.
Tip: Use clear descriptions and set how actions show up. This helps people find the right action in your connector.
Test Operations
After you Create Custom Connectors and set actions, you need to test them. Testing makes sure your connector works right.
Go to the Test tab in the custom connector wizard.
Pick or make a connection. Type your API key or other info.
Pick an action to test.
Type in sample input values.
Click "Test Operation".
Look at the response. Check for a status code of 200 and see the data.
You can also test your connector in a Power Apps app:
Add the connector as a data source.
Put in a gallery or label.
Link the data to your connector’s response.
Preview the app and see if the data shows up.
Testing helps you find problems early. Always test each action with real data before you use the connector in your app.
Note: Keep notes for your custom connector. Write down the actions, parameters, authentication, and test results. Good notes help others use and fix your connector.
You can Create Custom Connectors in Power Apps to add new features and connect to many services. The wizard makes it easy, whether you start from nothing or bring in an OpenAPI file. With careful setup and testing, your connector will work well in your apps.
Use in Power Apps
Add Connector to App
You can put your custom connector into a Power Apps app with a few steps. First, open Power Apps and make a new blank canvas app. Go to the Data menu and look for your connector in the list. Click it to add as a data source. This lets your app talk to the outside API you set up with Create Custom Connectors.
Follow these steps to connect your app:
Open Power Apps and pick Solutions. Make a new solution if you want to keep things neat.
Make a blank canvas app inside your solution.
Go to the Data menu and find your custom connector.
Add the connector as a data source.
Add things like tables or galleries to show data from the API.
Tip: You can use formulas to change or show more data. For example, use the Concat function to show data from related tables.
If you see errors or missing data, check your connector setup. Some problems are unsupported data types or missing parameters. Make sure your connector and app are in the same environment to stop API errors.
Use Actions in Screens
After you add the connector, you can use its actions in your app screens. Each action matches an API endpoint you set up with Create Custom Connectors. You can add buttons, labels, and input boxes to call these actions and show results.
Here is how you use actions:
Put a button on your screen.
Set the button’s OnSelect property to call the connector’s action. Use the operation ID and input parameters.
Add a label to show the result. Link the label to a variable that saves the connector’s response.
Test your app by typing data and clicking the button. The label updates with real-time data from the API.
Note: Always test your actions with real data. If you get errors, use the ParseJSON function to read error messages and show them in your app. This helps you fix problems fast.
You can watch how your connector works by turning on Formula Level Error Management. This lets you catch errors and show easy messages to users. Keep your notes up to date so you can fix problems and help others use your connector.
Custom connectors in Power Apps help you in many ways.
1. You can make tasks automatic and make fewer mistakes. 2. You do not need hard coding, so you save time and money. 3. You can see all your data together to make better choices. 4. You can link to any API, even special or private ones. 5. You use good ways to keep things safe and connect well.
Try using more APIs and learn about cool features like custom actions or changing data. Next, put your connector in a Solution, share it with your group, and use environment variables to keep things safe.
FAQ
What should you do if your custom connector does not show up in Power Apps?
Make sure you published the connector and that it is in the same environment as your app. Refresh the data sources list. If you still do not see it, check your permissions or ask your admin for help.
Can you edit a custom connector after you create it?
Yes, you can edit your custom connector at any time. Go to the Custom Connectors section, select your connector, and click "Edit." Save and republish your changes so your app uses the latest version.
What types of APIs can you connect to with custom connectors?
You can connect to most RESTful APIs that use HTTP and return data in JSON format. The API must have clear documentation and support authentication methods like API key, OAuth 2.0, or Basic Authentication.
How do you share a custom connector with your team?
Go to the connector settings.
Click "Share."
Add users or security groups.
Set their permissions.
Only users with the right permissions can use or edit the connector in their apps.