PowerPlatformConnectors icon indicating copy to clipboard operation
PowerPlatformConnectors copied to clipboard

[BUG] Square Payments is unable to authorize

Open ThePoShWolf opened this issue 2 years ago • 8 comments

Type of Connector

Independent Publisher Connector

Name of Connector

Square Payments

Describe the bug

I created a Logic App workflow and added in a Square Payments action. When I attempt to authorize myself, I'm met with the following error:

image

Here is the full url:

https://squareupsandbox.com/oauth2/authorize?client_id=sq0idp-bjhfropQ5DM7gobOrHkHUA&response_type=code&redirect_uri=https%3a%2f%2fglobal.consent.azure-apim.net%2fredirect&scope=&state=459f5c37-c7bc-4cf4-b5ae-430ba31c4514_logic-apis-westus2_azure-apim.net

You'll notice that it is also pointed at the sandbox URL.

For what its worth, I did try using the production URL and replacing the Client ID with my own, but I was still met with an error:

Failed with error: 'OAuth2 authorization flow failed for service 'Generic Oauth 2'. OAuth 2 sign in failed to exchange code for access token. Client ID and secret sent in form body.. Response status code=Unauthorized. Response body: { "message": "Not Authorized", "type": "service.not_authorized" } Client ID and secret sent in Basic authorization header.. Response status code=BadRequest. Response body: { "message": "missing required parameter 'client_id'", "type": "bad_request.missing_parameter" } '. Please sign in again.

Is this a security bug?

No, this is not a security bug

What is the severity of this bug?

Severity 1 - Connector is broken or there's a very serious issue

To Reproduce

This is very simple to reproduce (at least in a Logic App):

  1. Create a workflow
  2. Add a Square Payments action (and don't already have an existing connection)
  3. Click on the Sign In button in that new action.

Expected behavior

I would expect to be presented with a Square login screen and then be able to sign into my Square account and be able to use the connector.

Environment summary

Azure Logic Apps

Additional context

I'll tag @troystaylor since he is the author of this connector.

Thanks!

ThePoShWolf avatar Aug 07 '22 23:08 ThePoShWolf

Thank you, Anthony, for alerting me to this issue. Let me check with the deployed files and recreate a login. Expect a fix to be submitted within the next few days.

troystaylor avatar Aug 08 '22 13:08 troystaylor

No problem! Thanks for the quick response and for the other connectors that you've released. Your work has made mine a lot easier 😃

ThePoShWolf avatar Aug 08 '22 13:08 ThePoShWolf

This should be resolved with this PR: https://github.com/microsoft/PowerPlatformConnectors/pull/1878

troystaylor avatar Aug 09 '22 16:08 troystaylor

@troystaylor I saw that the PR was merged 3 days ago, but I'm still getting an error when trying to authenticate the Square Payments connector in a Logic App:

image

Is it supposed to be pointed at the sandbox URL?

ThePoShWolf avatar Sep 05 '22 01:09 ThePoShWolf

When you go to your Square Applications, there will be a button to open your Sandbox account: brave_VGzdPIwWV1

troystaylor avatar Sep 08 '22 13:09 troystaylor

Ah, ok, I went ahead and did that and got past the previous screen.

However, now it is showing the following error again:

image

ThePoShWolf avatar Sep 08 '22 13:09 ThePoShWolf

The same issues still happening 2023-July

stanlyong avatar Jul 16 '23 02:07 stanlyong

Having the same issue here. Have tried signing out, deleting cookies etc. Once I open up the sandbox account from the developer dashboard it won't authenticate. https://squareupsandbox.com/oauth2/authorize?client_id=sq0idp-bjhfropQ5DM7gobOrHkHUA&response_type=code&redirect_uri=https%3a%2f%2fglobal.consent.azure-apim.net%2fredirect&scope=&state=c3b437fb-3f0d-4e0e-9c63-8bee0f9b4db6_canada-001_azure-apim.net

jayseet avatar Mar 25 '24 13:03 jayseet