0
votes

I am trying to build a Custom Connector in the Power Platform to connect to the BMC Helix (formerly Remedy) system to create work orders and such. I am using OAuth2 and was given a callback URL, auth URL, token URL, client ID and client secret.

I went to create a connector from scratch. I populated the fields, but I wasn't sure what to put for the 'Refresh URL', so I used the token URL there too.

I am trying to accomplish testing this connector and my successful test would be to get a JWT from doing a POST to the /api/jwt/login endpoint of BMC Helix. It should return a JWT which I can use to make subsequent calls.

Upon testing this, I go to create a connection, but a window opens (which I believe should be a prompt for authentication), but instead it contains an error saying 'unauthorized_client' coming back from the BMC Helix system at the /rsso/oauth2/authorize endpoint. It also contains a property within the URL of redirect_uri = https://global.consent.azure-apim.net/redirect.

Is there something on the Helix side I need to further configure? Not sure why I am getting this....

1

1 Answers

0
votes

It sounds like you need TWO METHODS in your connector. A POST to call the token server, a GET (or another POST) to call the API (using the token received from Call 1).

One approach I've successfully used in the past is:

  • Use Postman to get your token server call working with OAUTH
  • Then use Postman to get your subsequent API calls working with the token appended
  • Save both requests to a single Postman collection
  • Export the Postman collection (as a V1 (deprecated) if I recall correctly)
  • Import this collection into PowerApps Custom Connector (create new/import from Postman Collection)

You'll have to massage it a bit after import, but it will give you a good headstart and you're starting from a known-good place (working Postman calls)

Good luck!