The Microsoft Power Platform provides a tremendous amount of native functionality, enhanced by premium and third-party connectors. But sometimes that's just not enough to get the job done. You need something specific, a plugin that does exactly what the business needs without complex backend configuration, confusing expression syntax or additional per-user cost.
In this step-by-step tutorial you will learn how to create a custom connector from scratch, construct an API definition, deploy it to the cloud and make it available to users throughout your tenant so they can easily drop it into their forms and flows. As an added bonus, you'll also learn valuable tips and tricks for scaling out your custom connectors for enterprise, ISV and multi-tenant scenarios.
5. COST
Avoid premium connectors or consolidate multiple
connectors into a single endpoint
FLEXIBILITY
Custom connectors can be adapted to suit various
scenarios and changing requirements
USABILITY
Complex syntax and action sequences can be
abstracted or greatly simplified for better productivity
and faster adoption
SUITABILITY
Support specific business scenarios, such as connecting
legacy backend systems or private cloud infrastructure
OPPORTUNITY
6. Action
Provides a visual “drag and drop”
component for users to interact with at
design time
Description
Appearance, target URL, scheme,
endpoint, and authentication method of
the connector
Definition
The actions, triggers, references and
policies that comprise the connector
functionality
API
The target system that performs the
actions specified in the definition and
returns results
FRAMEWORK
7. Title, version, host, base
path, schemes, and
input/output format of the
connector
Information
Individual operations
(endpoints) and their
visibility, headers, verbs,
response definitions, and
parameters
Actions
Timed (polling) or event-
driven (webhook) actions
Triggers
Reusable input and output
objects
References
Templates for modifying
runtime behavior
Policies
A
B
C
D
E
COMPONENTS
8. INFORMATION
• General information about the
connector
• Title
• Version
• Description
• Host
• Scheme
• Base Path
• Security Definition
• None
• Basic
• API Key
• Oauth 2.0
9. ACTIONS
• API endpoints
• HTTP method: GET, POST, PUT,
PATCH, DELETE, HEAD, OPTIONS
• Multiple methods supported in single
path
• Operation ID’s must be unique
within the scope of the definition
• Use tags for grouping operations
and samples to describe inputs
• Not currently supported in apps/flow
UI
10. TRIGGERS
• Leverages MS-specific OpenAPI
extensions to describe
automated actions
• Polling
• Pull model
• Periodically queries remote API for
new data
• Webhook
• Push model
• Calls app/flow API when system
events occur
• Beware the LOCATION header during
webhook creation (necessary for
later deletion)
11. REFERENCES
• Consolidate repetitive
inputs/outputs into definitions
(references) using the #ref tag
• Shared between actions and
triggers
• Read-only support in apps/flow
UI
• Create and manage in Swagger
editor
• Map to serializable (JSON)
objects in API
12. POLICIES
• Set of pre-defined templates for
user-configurable runtime
behavior changes
• Map variables
• Modify base URL
• Override operation paths and
methods
• Convert object types
• Set header values
• Change connector properties
13. API
• Any publicly accessible RESTful
service
• Azure functions
• Map routes, security and
methods to Swagger definition
• Leverage APIM to abstract URL’s
and authentication/authorization
• Process inputs (parameters) and
return outputs (definitions)
14. GET YER SWAGGER ON
The UI is limited in advanced
functionality, understanding the
OpenAPI specification and how to
properly construct a Swagger file is
a must.
TRIGGERS ARE FOR CLOSERS
Policies are difficult to construct
properly and very challenging to
debug. Get the basics down first
and deploy a functional connector
before tackling the hard stuff.
CORS, CORS, CORS
Test operations in the UI will fail if
CORS policy is not enabled on API
endpoint(s) – it’s a browser thing.
WHERE HAVE ALL THE #REFS GONE?
#ref elements simplify complex
definition files but they can’t be
created in the UI – drop to the
Swagger editor instead.
POLICIES FTW
The OpenAPI definition structure is
static but policies provide an
advanced level of runtime flexibility.
AUTH IS HARD
Don’t overcomplicate things in the
beginning. Start with simple
authentication then build up to
OAuth for more security.
GOTCHAS
19. CREDENTIAL
MANAGEMENT
Token or key creation,
refresh and revocation
INTERACTION
User feedback, issue
reporting and endpoint
verification.
DOCUMENTATION
Expose API definition,
inputs, outputs and
examples.
SUBSCRIPTIONS
21. Submit package via ISV studio,
provide instructions, test, revise
as needed, receive final approval
SUBMIT
Monitor status as solutions is
deployed to each geographic
region
ROLL OUT
Create and deploy custom
connector in your own tenant
CREATE
Download connector package
files using PACONN tool, modify
and re-package
PACKAGE
Branch Github repo, update
public folders with spec files,
submit PR
OPEN SOURCE
1 2 3 4 5
PUBLICATION
22. Create fully functional custom connector in your tenant
CREATE
Set production logos, colors, descriptions and security
method
CONFIGURE
Test all actions and environments (Power Apps, Flow, Logic
Apps)
TEST
Update specification with all references, definitions and
information
FINALIZE
CUSTOM CONNECTOR
23. 01
Download and install Power Platform Connectors CLI
https://github.com/Microsoft/PowerPlatformConnectors/tree/master/tools/paconn-cli
CLI
02
apiDefinition.swagger.json - Update with final spec values and footer
apiProperties.json – Set security, branding and publisher values
settings.json - Modify connector ID only if updating existing submission
Modify Files
03
Run validation command to analyze package contents
paconn validate --api-def [Path to apiDefinition.swagger.json]
Validate Package
04
Customer-facing description and instructions.
Not part of the package but required for submission.
Create Intro.md
PACKAGE
24. Create a new submission and upload your
custom connector package
SUBMIT
Update connector based upon feedback
and re-submit
REVISE
Add your connector documentation to the public GitHub
repo and submit a PR
DOCUMENT
Create a new sandbox environment and re-
test all connector actions
TEST
1
2 3
4
ISV STUDIO