Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INVALID_LOGIN_ATTEMPT #1

Open
ryanlebato opened this issue Aug 10, 2022 · 5 comments
Open

INVALID_LOGIN_ATTEMPT #1

ryanlebato opened this issue Aug 10, 2022 · 5 comments

Comments

@ryanlebato
Copy link

ryanlebato commented Aug 10, 2022

I am trying to implement this with netsuite and power automate.
The authorization header runs successfully, however my actual GET request fails saying INVALID_LOGIN_ATTEMPT.

I have made a few tweaks to the signature by adding realm and changing the signature method to 'HMAC-SHA256' as this is what I am using.

$SignatureParams = @{ 'realm' = '7640830'; 'oauth_consumer_key' = $OAuth.ApiKey; 'oauth_token' = $OAuth.AccessToken; 'oauth_signature_method' = 'HMAC-SHA256'; 'oauth_nonce' = $OauthNonce; 'oauth_timestamp' = $OauthTimestamp; 'oauth_version' = '1.0'; }

I tested with the exact same credentials in PostMan and it works. I can also see that my headers between PostMan and PowerAutomate are exactly the same (except for the nonce and timestamp)...

@derekngibbs
Copy link

I'm having the same issue. Did you ever figure out the issue?

@Uthoocha
Copy link

I am looking for a solution to use Power Automate to post Data from Dynamics into Netsuite.
I feel like i have followed several people around the net to find nothing but dead ends.
From this post_
https://mgr.medium.com/how-to-connect-to-netsuite-from-microsoft-power-automate-using-oauth-1-0-1d7670972406
to this post
https://powerusers.microsoft.com/t5/Using-Connectors/NetSuite-Custom-Connector-via-OAuth-2-0/td-p/590277

At this point I would just like to know if anyone has actually achieved this and is it work me trying to implement any of this older proposed solutions. OR has time and updates provided solutions now, which means Power Automate HTTP Action will just work with Netsuites OAUTH2 suitetalk API and tockens refresh etc.

Does anyone know?

@kgrindstaff
Copy link

I am having the exact same issue. Getting the Invalid Login Attempt error from NetSuite. Postman works great but cannot get Power Automate to work using the Azure Function App that was provided. I am not sure what is missing but the Authorization header seems to be the same as Postman so I assume it has something to do with the signature creation. Has anyone figured out how to make this work?

@Uthoocha
Copy link

Uthoocha commented May 25, 2024

I actually managed to build a solution that works with Power Automate (PA), but it was a pain in the a s s!

I had to use a C# Azure Function to do the authorisation, (Shout out to Eric Popivker for the C# part, whoever you are)
https://medium.com/entech-solutions/how-to-use-netsuite-rest-api-with-oauth-2-and-c-net-126ac118919c
The SSL Cert was a bit tricky, but there are some good videos on how to do it
https://www.youtube.com/watch?v=Ug2ZtI8wCDg this one was the best (Also linked by Eric P.

https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-your-first-function-visual-studio

I used a CRON flow to call this function every 15 mins, get the token and store it in PA as environmental variable, which I can then use in other flows to pass and pull data from NS using http block.

between these videos and Chat GPT to take the C# functions above, paste all the classes into an Azure C# functions, and join them together, I made a pretty slick solution that has not failed us yet. Pushing Orders from Dynamics into Netsuite on Fulfilment. Not bad for someone who is not a Dev, could not have done it without Eric Popivker's C# function.

But oAuth 2 Machine to Machine is a must with NS and PA, you're wasting your time trying to use oAuth 1 as the Token will time out after 1 week even if you do mange to make it work, a human still needs to re authorise it once a week, which is not a good solution for automation.

@kgrindstaff
Copy link

I actually managed to build a solution that works with Power Automate (PA), but it was a pain in the a s s!

I had to use a C# Azure Function to do the authorisation, (Shout out to Eric Popivker for the C# part, whoever you are) https://medium.com/entech-solutions/how-to-use-netsuite-rest-api-with-oauth-2-and-c-net-126ac118919c The SSL Cert was a bit tricky, but there are some good videos on how to do it https://www.youtube.com/watch?v=Ug2ZtI8wCDg this one was the best (Also linked by Eric P.

https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-your-first-function-visual-studio

I used a CRON flow to call this function every 15 mins, get the token and store it in PA as environmental variable, which I can then use in other flows to pass and pull data from NS using http block.

between these videos and Chat GPT to take the C# functions above, paste all the classes into an Azure C# functions, and join them together, I made a pretty slick solution that has not failed us yet. Pushing Orders from Dynamics into Netsuite on Fulfilment. Not bad for someone who is not a Dev, could not have done it without Eric Popivker's C# function.

But oAuth 2 Machine to Machine is a must with NS and PA, you're wasting your time trying to use oAuth 1 as the Token will time out after 1 week even if you do mange to make it work, a human still needs to re authorise it once a week, which is not a good solution for automation.

Thank you for responding! I will take a look at this and see if I can make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants