web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating Custom Connec...
Power Apps
Unanswered

Creating Custom Connector using Client certificate authentication

(1) ShareShare
ReportReport
Posted on by
Hi, I need to create a custom connector in PowerApps using client certificate authentication. Most of the blogs says there is an option to select Client Certificate Auth in security tab of custom connector, but I only see the existing options like - Using API key, OAuth 2.0 or basic authentication. Please help me with any end-to-end process guide to setup custom connector with client certificate authentication. Thanks.
Categories:
I have the same question (0)
  • Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at
    It appears that creating a custom connector in PowerApps using client certificate authentication is not straightforward, as the option might not be readily visible in the security tab of the custom connector settings. Here is an end-to-end guide to help you set up client certificate authentication for a custom connector:
    Steps to Create a Custom Connector with Client Certificate Authentication
    Prepare the Client Certificate:
    Ensure you have a valid client certificate. This certificate should be in a format supported by PowerApps, such as .pfx or .pem.
    Create the Custom Connector:
    Navigate to PowerApps and sign in.
    Go to Dataverse and select Custom Connectors.
    Click on New Custom Connector and choose Create from blank.
    Define General Information:
    Provide a name for your custom connector.
    Optionally, upload an icon and set the background color.
    Set Up the Host and Base URL:
    In the General tab, specify the host and base URL for your API.
    Configure Security:
    In the Security tab, you typically see options like API Key, OAuth 2.0, and Basic Authentication. If client certificate authentication is not visible, you might need to configure it manually.
    Select No Authentication for now, as you will handle authentication in the next steps.
    Define the API:
    In the Definition tab, define the actions and triggers for your API. Specify the request and response formats.
    Handle Client Certificate Authentication:
    Since the direct option for client certificate authentication might not be available, you can handle it programmatically within your connector.
    Use the Code tab to write custom code that includes the client certificate in the request headers.
    Example Code for Including Client Certificate
    Here is an example of how you might include the client certificate in the request headers using custom code:
     

    const https = require('https');

     

    const fs = require('fs');

    // Load the client certificate

    const clientCert = fs.readFileSync('path/to/client-cert.pem');

    const clientKey = fs.readFileSync('path/to/client-key.pem');

    // Create an HTTPS agent with the client certificate

    const agent = new https.Agent({

      cert: clientCert,

      key: clientKey,

    });

    // Define the request options

    const options = {

      hostname: 'api.example.com',

      port: 443,

      path: '/endpoint',

      method: 'GET',

      agent: agent,

    };

    // Make the request

    const req = https.request(options, (res) => {

      let data = '';

      res.on('data', (chunk) => {

        data += chunk;

      });

      res.on('end', () => {

        console.log(data);

      });

    });

    req.on('error', (e) => {

      console.error(e);

    });

    req.end();


     

    Final Steps
    Test the Connector:
    Test the custom connector to ensure that the client certificate authentication works as expected.
    Publish the Connector:
    Once tested, publish the custom connector for use in your PowerApps environment.
    Additional Resources
    Microsoft Documentation: Refer to the Microsoft Learn module on configuring custom connectors with authenticated APIs.
    Community Forums: Check the PowerApps Community for discussions and solutions related to client certificate authentication.
    If you need further assistance or have specific questions, feel free to ask!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard