cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Custom Connector Status Code 200, Error Code 403

Hello, 

 

Its been a long week figuring out how to create a custom connector from PowerApps to a REST endpoint of one of the SaaS apps we use, BUT I'VE DONE IT!

 

Wahoo! .... theres just one thing...

 

I'm getting a status code of 200 (which means I made contact with the REST endpoint), but the response shows an error 403, SSL Required. 


How do I troubleshoot this? 

 

apiQuestion2.png

9 REPLIES 9
Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

Hey ericonline, 

 

No clue what your endpoint looks like or what your SaaS app requires, but my initial guess would be that the endpoint requires you to make an HTTPS call?  I'd start by checking the endpoint url for https://

 

Hope this helps,

 

RT

Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

Hi @RusselThomas

 

This is my first (API) rodeo so I'm still on the upside of the learning curve. 

 

The endpoint is https and looks like: 

 

https://saas.com/rest/services/my/saas/server/query?<parameter1>=whatever&<parameter2>=youknow<token>=crazy_string

The redirect URL (autogenerated by PowerApps custom connector) looks like: 

https://msmanaged-na.azure-apim.net/apim/crazy_string/my/saas/server/query?<parameter1>=whatever&<parameter2>=youknow

 

When I click "Test" in the custom connector, the test URL looks like: 

https://msmanaged-na.azure-apim.net/apim/test.longstring/anotherlongstring/my/saas/server/query?<parameter1>=whatever&<parameter2>=youknow

 

When I first open the app, I have to authenticate to the SaaS using OAUTH2.0 (similar to how you login to Google, etc if you're using their connectors). After that, I test the connection and get the 403 error. 

 

How do I setup SSL between "msmanaged-na.azure-apim.net" (which was auto-generated by PowerApps) and the SaaS endpoint? 

 

 

Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

Just went back through the "General" tab on the Custom Connector and found I had "HTTP" for the scheme. Updated to "HTTPS", saved connector and tested again, but same results. 

 

apiQuestion3.png

Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

I've had some issues in the past where the PA custom connector 'proxy' doesn't match the normal request/response structure defined in the swagger, especially when you're wrapping authentication. 

I didn't fix it - but one way to work around it is to set up either a request/response or an HTTPS Flow and test it from there with 'unwrapped' headers.

 

It's not ideal from a security standpoint, so I wouldn't suggest it as a solution, but it might help to figure out what's working and what isn't. 

 

Like I said though, I didn't manage to get mine working through a native PA custom connector - I eventually had to build an azure function to handle the call which was a bit of a pain.  We'll need some of the bigger brains trust from the PA team to step in and advise 🙂

 

Sorry I couldn't be of more help,

 

RT

Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

Hm. Yeah, i'm not sure about that. I built this "from scratch" in PowerApps so no Swagger/OpenAPI file. 

 

Here's something interesting: 

  • When I fill in all the parameters in the actual PowerApp, rather than the Custom Connector TEST area, I don't get any errors. 

 

How do I show the results of an API call in a text box/label/dropdown in the app? 

Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

Assuming there is a readable response back to PowerApps, just wrap the call in a Collect() statement - it will still execute the call and anything returned will be placed in the collection which you can view either in the Collections screen, or render on-canvas in a control.

 

Kind regards,

 

RT

Community Support Team
Community Support Team

Re: Custom Connector Status Code 200, Error Code 403

Once you have updated the Schema to HTTPS, please take a try to delete the connection built with the previous custom connector, then create a new one to check.

 

As the response is a normal 200 OK , there should be no warnings within the PowerApps, Besides, how you defined the Response under the Definition part of the connector?

 

 

As @RusselThomas suggested, the result could be saved into a collection.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

@v-micsh-msft and @RusselThomas

 

I did NOT create a response! That was causing some issue for sure. I've since created a default response. Still stuck on the OAUTH2.0 token piece. 

 

  • I've setup OAUTH2.0
  • Added the Microsoft Redirect URI to the REST endpoint
  • Click "New Connection" or open the app and I'm prompted to login to the SaaS using UN/PW
  • Says "Connected"
  • Running a Test results in a JSON payload
    • Curiously, I'm still required to append a Token (generated from a quick Postman call to the SaaS token server) to the request. 
    • I thought that was what the OAUTH was for?
  • BUT when running the API request OnSelect of a button, it returns a blank Collection ("Value")
  • Ugh! Still troubleshooting and determining a best practice for creating a NON-AD custom connector
Super User
Super User

Re: Custom Connector Status Code 200, Error Code 403

Hi ericonline,

 

Does your SaaS support Shared Access Signatures?

 

Kind regards,

 

RT

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,593)