Custom connectors are interfaces through which your devices and services communicate with each other. They enable users to craft reusable connectivity frameworks with services having RESTful APIs. These come handy when predefined connectors are not sufficient to meet specific business requirements. With custom connectors, you can create streamlined data communication routes that fit your unique tech landscape.
Use Cases for Custom Connectors
1. Service Interoperability
Suppose a business uses a cloud-based customer relationship management (CRM) tool that isn’t directly supported by Power Platform. They can develop a custom connector to interfacing and interoperating with the CRM service through its RESTful APIs.
2. Communication with In-House Services
Consider a situation where a company has built in-house services such as proprietary data analytics or machine learning algorithms. They can create custom connectors to connect these services to the Power Platform, thereby seamlessly integrating their in-house solutions into their overall Microsoft environment.
3. Bridging Gap Between Disparate Systems
If an organization has legacy systems and modern cloud applications running concurrently, custom connectors are powerful tools for bridging the gap between these disparate systems.
4. Integrating 3rd Party Devices
Devices such as IoT gadgets, which are a part of the vast Microsoft ecosystem, can be integrated into the Power Platform by creating custom connectors for their APIs.
Creating a Custom Connector in Microsoft Power Apps
To illustrate the process, let’s learn how to create a custom connector in Microsoft Power Apps. Take note that we should have the REST API with a Postman collection or a Swagger definition file that we can import or manually define in the custom connector wizard.
- Log into your Power Apps account and navigate to ‘Data’ -> ‘Custom Connectors.’
- Click ‘New Custom Connector’ and choose ‘Create from Blank.’
- Assign your connector a name then click ‘Continue.’ From there, you can start adding ‘Actions’ and ‘Triggers.’
- ‘Actions’ define what your API will perform, such as GET, PUT, PATCH, DELETE, etc.
- ‘Triggers’ are set up when you want your API to kick-start upon the occurrence of a specified event.
- Once your actions and triggers have been set up, you can ‘Create connector.’
- To test your custom connector, go to the ‘Test’ tab on your Power Apps platform. Input any required parameters and select ‘Test operation.’ If everything is correctly set up, you will see your test result.
Remember, as you prepare for the PL-900 Microsoft Power Platform Fundamentals exam, being familiar with how to develop and implement custom connectors for Power Apps can significantly enhance your ability to customize and optimize Microsoft Power Platform for your unique environment. By understanding use cases for custom connectors, such as service interoperability, bridging gaps between systems, integrating in-house services, and incorporating 3rd party tools and devices, you gain a deep insight for providing seamless and efficient data communication routes.
Practice Test
True/False: In Microsoft Power Platform, custom connectors can be used to extend Power Apps by adding data from services which have APIs but no pre-built connectors.
- Answer: True
Explanation: Custom connectors serve as a bridge between the services that do not have a pre-built connector and Power Apps. They leverage APIs of these services to pull data and use them in the application.
Multiple select: When would you typically use a custom connector? Select all that apply.
- A. When the service you are working with has a pre-built connector
- B. When you are working with an on-premises data gateway
- C. When the service you are working with only has an API
- D. When you need more features that are not included in a pre-built connector
Answer: B, C, D
Explanation: While pre-built connectors are typically used when available, custom connectors are created to work with an on-premises data gateway, when dealing with a service that only has an API, or when the pre-built connector does not have the required features.
True/False: Any service with a RESTful API can be used to create a custom connector.
- Answer: True
Explanation: The Power Platform supports RESTful APIs, therefore any service offering a RESTful API can be used to create a custom connector.
Single select: A custom connector is:
- A. An interface for creating custom apps
- B. An interface for integrating different systems
- C. A descriptor for a service’s API
- D. A tool for creating custom workflows
Answer: C. A descriptor for a service’s API
Explanation: A custom connector serves as a wrapper around a RESTful API that allows the Power Platform to communicate with that service.
True/False: You can create a custom connector using Form Builder.
- Answer: False
Explanation: Custom connectors are typically created in the Power Apps studio or Power Automate design environment, not in Form Builder.
Single select: Can custom connectors be used in Power Automate?
- A. Yes
- B. No
Answer: A. Yes
Explanation: Custom connectors can be used in both Power Apps and Power Automate, allowing for data sharing and process automation.
True/False: Custom connectors are used only when there is no available connector for your service in the Power Platform built-in connectors.
- Answer: False
Explanation: Although this is one of the primary uses, custom connectors can also be used to add more functionalities not provided by pre-existing connectors or when working with an on-premises data gateway.
Single select: What type of authentication can be configured on the custom connectors?
- A. OpenID Connect
- B. Basic authentication
- C. No authentication
- D. All of the above
Answer: D. All of the above
Explanation: All mentioned authentication types can be configured on the custom connector as per the requests required by your service API.
True/False: Custom connectors provide a way for Power Apps and Power Automate to access external data and services.
- Answer: True
Explanation: One of the main use cases of custom connectors is to enable Power Apps and Power Automate to access and interact with external data and services.
Multiple select: Custom connectors can be created from:
- A. An OpenAPI definition
- B. A Postman collection
- C. A URL
- D. All of the above
Answer: D. All of the above
Explanation: Custom connectors can be created from any of these sources as long as they meet the required standards and have the necessary functionalities.
Interview Questions
What is a custom connector in the context of Microsoft Power Platform?
A custom connector in Microsoft Power Platform is basically a wrapper around a REST API that allows Power Apps and Power Automate to communicate with the API.
In which scenarios is it appropriate to use custom connectors?
Custom connectors are used when the prebuilt connectors in Microsoft Power Platform are unable to meet specific project requirements. If the service you want to connect to isn’t already represented in the list of prebuilt connectors, or if you need to encapsulate complex operations, a custom connector becomes necessary.
What are the three types of actions supported by custom connectors?
Custom connectors in Microsoft Power Platform support the following three types of actions: Creating a record, Updating a record, and Deleting a record.
Can you name a few mediums that custom connectors can interact with?
Custom connectors can interact with the web (HTTP, RESTful services), an on-premise infrastructure like a company’s internal server, and Software as a Service (SaaS) services.
What essential information must be defined when creating a custom connector?
Creating a custom connector requires the following essential information: the host (endpoint URL), the base URL for all operations, the authentication type used, and the actions and triggers that are callable as operations.
Which authentication types are supported by custom connectors?
Custom connectors support four types of authentication: No authentication, Basic authentication, API Key, and OAuth 2.0.
Can you use a custom connector to access data stored in a private network?
Yes, a custom connector can access data stored in a private network. This requires an on-premises data gateway to provide a quick and secure connection between the on-premise data and the custom connector.
Why would you import an OpenAPI definition during the creation of a custom connector?
Importing an OpenAPI definition can speed up the creation of a custom connector as it can define the host, authentication type, and define the actions and triggers that can be performed by the connector, saving a significant amount of time during connector setup.
What are the key steps in testing a custom connector in Microsoft Power Platform?
Key steps in testing a custom connector include: Creating a connection to the custom connector, choosing an action to test, filling in the necessary parameters, and invoking the action to verify that the expected output is returned.
Does Power BI support the use of custom connectors?
Yes, Custom connectors can be used in Power BI to connect with the data sources that aren’t available in the prebuilt connectors list of Power BI.
Can you share a custom connector with other people in your organization?
Yes, custom connectors support sharing with others within your organization in Power Apps. You can specify who in your organization can see and use your connector.
What is a Postman collection in the context of custom connectors?
A Postman collection is a group of saved requests you can organize into folders. You can import a Postman collection while creating a custom connector in the Microsoft Power platform.
How often does a data gateway need to be online for a custom connector to function without errors?
An on-premises data gateway must be online whenever a flow that uses a custom connector is executed. If the gateway is offline, there could be a “BadGateway” error.
How can you ensure the data that’s being transferred by the custom connector is secure?
You can ensure the data security while transferring through a custom connector by enforcing TLS/HTTPS connections, using secure authentication methods like Oauth 2.0, and following best-practices of data loss prevention policies.
Can the actions in custom connectors be parameterized?
Yes, actions in custom connectors can be parameterized. Parameters can be used for passing data, specifying the type of data, and for controlling various behaviors of the action.