cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Imke Advocate I
Advocate I

Custom connector Oauth problem CORS

Hi experts,

I'm getting 403-error with "Invalid CORS request" in a custom connector for Zoom.:

image.png

 

The reason could be that call from client side instead of server side - so does anyone know how to adjust this?:

 

image.png

 

I'm using generic OAuth.
Not very familiar with the authentication options here, but if Azure AD would be an option, I'd be happy to try. But would need guidance on how to achieve that .

Thankful for any hints!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Custom connector Oauth problem CORS

Hi @Imke 

 

I did tried creating a custom connector for Zoom. Here are the details:

 

Here is my  Authentication type I used

 

image.png

 

Above I have set Refresh URL is same as Token URL

 

Here is the method I was trying to test

 

image.png

 

This is my test result:

image.png

 

So here I have replicated your error. I did tried with different things around and tried the same in POSTMAN using OAuth2 using client Id and Client Secret. Managed to generate a Bearer token via Postman and here is the result:

 

image.png

 

So this confirms that CORS error is nothing to do with the credentials or headers. Next what I tried is created a Power Automate action step using the current test connection and I got a different error saying invalid token. 

 

image.png

 

That indicates me that something in that test connection is not quite right. So what I did next is create a new connection.

 

image.png

 

As you can see above I created a new connection by clicking Add new connection.

 

Run my flow and here is the test result:

 

image.png

 

So try creating a new connection in your Power Automate action step. That should work as expected. I am not sure why the test failed under the custom connector. 

 

Please let me know how it goes.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Custom connector Oauth problem CORS

Hi @Imke 

 

I did tried creating a custom connector for Zoom. Here are the details:

 

Here is my  Authentication type I used

 

image.png

 

Above I have set Refresh URL is same as Token URL

 

Here is the method I was trying to test

 

image.png

 

This is my test result:

image.png

 

So here I have replicated your error. I did tried with different things around and tried the same in POSTMAN using OAuth2 using client Id and Client Secret. Managed to generate a Bearer token via Postman and here is the result:

 

image.png

 

So this confirms that CORS error is nothing to do with the credentials or headers. Next what I tried is created a Power Automate action step using the current test connection and I got a different error saying invalid token. 

 

image.png

 

That indicates me that something in that test connection is not quite right. So what I did next is create a new connection.

 

image.png

 

As you can see above I created a new connection by clicking Add new connection.

 

Run my flow and here is the test result:

 

image.png

 

So try creating a new connection in your Power Automate action step. That should work as expected. I am not sure why the test failed under the custom connector. 

 

Please let me know how it goes.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Super User
Super User

Re: Custom connector Oauth problem CORS

Hi @Imke 

 

Did you tried the below suggestion? Please let me know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Imke Advocate I
Advocate I

Re: Custom connector Oauth problem CORS

Hi @abm 

sorry, I missed your first message.

Thank you so much, it finally worked!! At the end I had to build a new connector, but yeah - now it's working as expected in the flow itself (same error messages like you during testing…)

 

Imke Advocate I
Advocate I

Re: Custom connector Oauth problem CORS

Hi @abm 

wondering if you also have an idea about the latest error-message:

image.png

Do I have to refresh or reset the connection in flow somewhere?

Thanks a lot !!

 

 

 

Imke Advocate I
Advocate I

Re: Custom connector Oauth problem CORS

Hi @abm  

just a quick update: I've deleted all existing connections for that custom connector and then was prompted to login again when triggering the flow again. Worked fine.

Scheduled for every 15 mins now and its still running OK. So maybe the problem is solved now.

 

 

Super User
Super User

Re: Custom connector Oauth problem CORS

Hi @Imke 

 

Thanks for the update.

 

When access tokens expire or become invalid but the application still needs to access a protected resource, the application faces the problem of getting a new access token without forcing the user to once again grant permission. To solve this problem, OAuth 2.0 introduced an artifact called a refresh token. A refresh token allows an application to obtain a new access token without prompting the user.

 

Did you set the refresh URL. Set the link same as Token URL.

 

image.png

 

If all running as expected please mark the solution as expected.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (5,985)