Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
366 stars 302 forks source link

Twitter connection with BYOA: Failed to login. Response status code does not indicate success: 401 (Unauthorized) #1021

Open abatishchev opened 6 months ago

abatishchev commented 6 months ago

Describe the Bug with repro steps

  1. Add action "Post a tweet"
  2. Provide connection's name
  3. Paste "Consumer API Key" from Twitter Dev Portal to field "Consumer Key"
  4. Paste "Consumer API Key Secret" to "Consumer Secret"
  5. Click "Sign In"
  6. Observe a pop-up window appearing and disappearing quickly
  7. Observe an error:

Failed to login. Response status code does not indicate success: 401 (Unauthorized)

What type of Logic App Is this happening in?

Consumption (Portal)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

No response

Screenshots or Videos

image

Browser

Edge version 122.0.2365.92

Additional context

Demo request "Create a Tweet" on public Postman workspace requires 4 secrets, not 2:

  1. Consumer Key
  2. Consumer Secret
  3. Token
  4. Token Secret

and works even from a simple PowerShell command:

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Authorization", "OAuth oauth_consumer_key=`"...`", oauth_token=`"...`", oauth_signature_method=`"HMAC-SHA1`",oauth_timestamp=`"...`", oauth_nonce=`"...`" ,oauth_version=`"1.0`", oauth_signature=`"...`"")

$body = @"
{
    `"text`": `"...`"
}
"@

$response = Invoke-RestMethod 'https://api.twitter.com/2/tweets' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

AB#27399144

hartra344 commented 6 months ago

Moved this to our backend repo/issues list. This looks like it's an issue with the connector.

abatishchev commented 6 months ago

Filed an incident per @rarayudu

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 45 days with no activity.

deanward81 commented 4 months ago

I'm investigating this issue now, will post an update here once I've done some log spelunking

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 45 days with no activity.

deanward81 commented 2 months ago

Looking into this again today

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 45 days with no activity.

deanward81 commented 1 month ago

Nearly there, expect to get to the bottom of this, this week