Skip to main content

Notifications

Community site session details

Community site session details

Session Id : EowpdSqS6/KqDizeNL8ZHO
Power Automate - Using Connectors
Unanswered

Error while calling on-prem api from custom connector

Like (0) ShareShare
ReportReport
Posted on 3 Oct 2023 19:38:36 by 43

I have created a custom connector to call on-prem API, this API is my test instance of the ERP system which uses HTTPS as scheme.

I have installed the on-prem data gateway on my laptop and custom connector is configured as bellow,

roshanma_0-1696361494180.png

 

roshanma_1-1696361534914.png

 

roshanma_2-1696361606839.png

 

I have created a connection with Username, Password and DataGateway.

When i test the connector it gives bellow error

"status": 500,
"message": "Received error payload from gateway service with ID 2016645: Substituted: HttpRequestException:<ccon>System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

 

Can anyone help on this?

Thanks,

 

 

  • roshanma Profile Picture
    43 on 04 Oct 2023 at 11:17:18
    Re: Error while calling on-prem api from custom connector

    Hi ,
    It is the Gateway Service Account, by default Gateway Service Configured to user  NT SERVICE\PBIEgwService,
    then i changed the service account to my login account domain\myusername then i checked the connector and then it worked,
    as a beginner can i know the reason for that and is it okay to use my account as a service account?

  • roshanma Profile Picture
    43 on 04 Oct 2023 at 11:14:50
    Re: Error while calling on-prem api from custom connector

    Hi ,
    It is the Gateway Service Account, by default Gateway Service Configured to user  NT SERVICE\PBIEgwService,
    then i changed the service account to my login account domain\myusername then i checked the connector and then it worked,
    as a beginner can i know the reason for that and is it okay to use my account as a service account?

  • roshanma Profile Picture
    43 on 04 Oct 2023 at 06:28:46
    Re: Error while calling on-prem api from custom connector

    Sorry if I'm bothering you. I'm quite new to the power platform.

    For testing purposes, I have created an asp.net web app (an API) and added the below record to applicationhost.config.

    <binding protocol="http" bindingInformation="*:58938:<my local ip>" />
    <binding protocol="https" bindingInformation="*:58938:<my local ip>" />

     

    To enable access from the local network, now local network users are able to access the API with the http, but when they use the https, the error

     

    <my local ip> sent an invalid response.

     

    • Try running Windows Network Diagnostics.
    ERR_SSL_PROTOCOL_ERROR

     

    also i have created a custom connector to this sample api , and it works with http as expected, but not with https.

     

    yes i understand i need to install an SSL certificate on my local machine.
    Is it needed to be installed at Truested Root Certifications or Personal? I have installed both stores but have had no luck.

  • Michael E. Gernaey Profile Picture
    41,822 Super User 2025 Season 1 on 04 Oct 2023 at 06:16:20
    Re: Error while calling on-prem api from custom connector

    @roshanma 

     

    The question was do you get an HTTPS SSL error?

    From the Power Automate system, all the way to the System it is talking too, has to have a Valid SSL Cert. You can still browse, even if its not valid, but power automate won't do it as a valid one is required.

     

    So something is broken in between the Power Automate Service and your endpoint internally


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • roshanma Profile Picture
    43 on 04 Oct 2023 at 05:59:09
    Re: Error while calling on-prem api from custom connector

    Hi ,
    Thanks for replying, yes i can browse the end point using the browser.


  • Michael E. Gernaey Profile Picture
    41,822 Super User 2025 Season 1 on 04 Oct 2023 at 05:52:17
    Re: Error while calling on-prem api from custom connector

    HI,

     

    If you cert is invalid you need to install a Cert on your Gateway/Internal that would be valid. Apologies, I dont have a link its just standard SSL.

     

    If I can ask, try browsing to your End Point that the Flow is calling. See if when you browse you get an SSL error. That would be where you would install a fresh one (or a valid one for this type of communications)


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • roshanma Profile Picture
    43 on 04 Oct 2023 at 03:34:06
    Re: Error while calling on-prem api from custom connector

    Hi,

    Could you please provide any web resources to resolve this issue?

    Thanks

     

  • Michael E. Gernaey Profile Picture
    41,822 Super User 2025 Season 1 on 03 Oct 2023 at 22:21:57
    Re: Error while calling on-prem api from custom connector

    Hi,

     

    The problem seems pretty clear, your SSL cert is not valid for what you are trying to do. 


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Using Connectors

Overall leaderboard

Featured topics