Power Apps, Custom Connectors and Application Registrations
Neil Haddley • August 9, 2021
Power Apps, Custom Connectors and Application Registrations
Creating a Custom Connector
To create a PowerApps Azure Active Directory Custom Connector I needed to provide:
Client id
Client secret; and
Resource URL
The Custom Connector is the Client Application
In OAuth 2 an application accesses a resource on behalf of a user.
In OAuth 2 the application does not store the user's username and password.
When setting up a Power Apps Custom Connector that will allow a user to access an API Service the Client Application is the Custom Connector and the Resource (Application) is the API Service.
Only three values are needed to create a Power Apps Custom Connector.
The three values needed to create a Power Apps Custom Connector are: the Client id (the client application registration ID), the Client secret (password); and the Resource URL (the resource application registration ID)
Here I extended the Vanilla JavaScript single-page application (SPA) using MSAL.js to authorize users for calling a protected web API on Azure AD tutorial to show how to configure a Power Apps Custom Connector using Azure application registrations.
A JavaScript tutorial using MSAL
The Vanilla JavaScript single-page application (SPA) using MSAL.js to authorize users for calling a protected web API on Azure AD tutorial demonstrates how to configure Azure Application Registrations for an API and for a Single Page Web Application (SPA) that calls an Application Programming Interface Service (API).
I cloned the git repository using this command:
BASH
1% git clone https://github.com/Azure-Samples/ms-identity-javascript-tutorial.git
Resource application registration
Before updating the Application Programming Interface (API) Service I needed to create the resource application registration.
Resource URL
The "Application (client) ID" value from the resource application registration is the Resource URL value I needed later to create the custom connector.
be70217c-6a30-4023-b667-d88bf222b94a
Client application registration
If I was following the Vanilla JavaScript single-page application (SPA) using MSAL.js to authorize users for calling a protected web API on Azure AD tutorial I would have created the client application registration for a Single Page Application (SPA) next.
Instead I created a client application registration for the Power Apps Custom Connector.
Client id
The "Application (client) ID" value from the client application registration is the Client id I needed to create the custom connector.
59259fa1-c2e1-486d-a8e6-92209abf090c
Client secret
The generated "Value" is the Client secret I needed to create the custom connector.
.ljDa4a7mFqn1tWj0wyPQ6X5L6B_3V.x~f
Enterprise Applications
A service principal is created in each tenant where the application is used.
The service principle in each tenant references the globally unique application registration.
The service principal defines what the app can do in the specific tenant, who can access the app, and what resources the app can access.
The service principal objects are what you see when you select the Enterprise applications page.






























































