How do I build a custom connector for Power Automate?
Hi,
I’ve been trying to build a custom connector from Powerautomate and it is not authenticating me. I have tried both Post authentification using Json as well as OAuth2.9 from Postman and they were both successful.
Issue #1: I’ve tried the api key authentication but don’t know where to find the API key for acumatica? Can someone let me know where to find it please?
Issue #2:
In lieu of the API Key authentication, I tried OAuth2.0 but keep getting the error: “The client application is not known or is not authorized”
Can you please confirm that my URLS are correct, I need the following fields:
Host: Host.acumatica.com
Client id: generated in acumatica under connected application
Client Secret: generated in acumatica under connected application
While I have not used Power Automate, I’m happy to share a workflow process we have had success with using Zappier.
First, we set the Acumatica side Connected Applications OAuth 2.0 Flow to ‘Resource Owner Password Credentials’ and generate a Shared Secret.
Next, call the ‘Token URL’ you mentioned in your post, passing the following in the request body in an x-www-form-urlencoded format:
grant_type: ‘password’
client_id: <The Client ID of your Connected Applications entry in Acumatica>
client_secret: <The Shared Secret>
username: <An Acumatica Username>
password: <The password for the above Acumatica username>
scope: ‘api’
If the setup is good, you will get a response that looks like this:
Now that you have the access_token, you can use it to send your follow up requests to Acumatica. You can do this by adding the following to your request headers:
Authorization: Bearer <your access token>
More information can be found here under the ‘Authorizing Client Applications to Work with Acumatica ERP’ section:
Hi Stephen, Thank you for your response. I did eventually figure out the OAuth2 from power automate to Acumatica but the parameters that Powerautomate sends acumatica for authentication is different and not in the correct format. see below:
@brenthitterdal , @ekermani , @stephenbologna39 Howdy! Great collection of information. FYI, I’m just diving into this. I’ll keep you posted on how I make out ;-)