I'm trying to create a REST Web Services custom connector to NetSuite, using the following security settings:
Identity Provider: Generic Oauth 2
Authorization URL: https://********.app.netsuite.com/app/login/oauth2/authorize.nl
Token URL: https://********.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token
Refresh URL: https://********.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token
Scope: rest_webservices
Redirect URL: https://global.consent.azure-apim.net/redirect
In NetSuite's side I created the necessary Oauth 2.0 role and integration. When I try to connect it opens a browser window for me to login to my user, and it correctly authenticates. The connection works for the first 60 minutes, but then Power Automate is supposed to refresh the token by using the Refresh URL, which is answered by NetSuite with a "BadRequest" error, followed by an "AccessTokenExpired" error. This can only be solved by manually re authenticating the connection in the browser, which is of course not practical.
I went through this issue with NetSuite's support but they seem to think it's a problem with Power Automate.
Has anyone been able to successfully keep the authentication working for more than 60 minutes?