cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jlocatell
Level 8

Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi folks trying to get a flow to run I've got this error

 

status401.JPG

 

 

The good is that I'm learning a lot about error messages a/o statuses. The bad is *really hard*¨to get a simple flow running smoothly for a while.

 

J

21 REPLIES 21
Microsoft Employee

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi jlocatell,

 

I created a similar flow, When a tweet is posted -> post a new tweet,

I run successfully once, and it fails multiple times, but it's because I'm out of call volume quota(maybe it's trottling by twitter), could you try another key word?

tweet-tweet.pngtweet-tweet-error.png

Microsoft Employee

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

 
jlocatell
Level 8

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

I've dealed already with the quota issue wondering why flow is not able of manage the API use in order of not to excess the famed quota.

 

that error is 403 this one is 401. Pears and apples of the same farm.

 

J

Power Automate Staff Sunay
Power Automate Staff

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi @jlocatell Have you checked your connections? Re-authorizing them will fix the issue, in case they are broken.

 

Thanks,

Sunay

jlocatell
Level 8

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Today I've got the 401 error again.

 

To check a connection means to delete and recreate it?

 

J

Power Automate Staff Sunay
Power Automate Staff

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

@jlocatell : No, you shouldn't have to recreate the connection.

What do you see on the my connections page.

https://flow.microsoft.com/manage/connections ?

Microsoft Employee

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Yes, try it. if it fails again, there might be a problem with our connector, we would fix it.

 

Thanks

CheekyTaurus
Level: Powered On

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Bumping this up again as it is still an unresloved issue.

 

I get this with every flow I create - RSS to Twitter. Twitter connection created *during a flow creation* will get ONE successful post of a tweet before all subsequent attempts to use that connection by the same flow or others that use it fail.

 

{ "status": 401, "message": "Unauthorized", "source": "127.0.0.1" }

 

I have not tested yet but I have a suspicion: does anyone else having this issue have 2FA turned ON for the target Twitter account?

 

I'm turning off 2FA today temporarily to test the theory.

 

UPDATE

 

2FA theory tested and disproven. Regardless of whether 2FA is turned on for the target account, a connection to Twitter only appears to work ONCE, and then only if that connection was created during the creation of a Flow. If you create the connection first and try to use it in a new or existing Flow, it doesn't even give you one successful one.

Power Automate Staff TravisB
Power Automate Staff

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi @CheekyTaurus,

 

Can you navigate to the flow runs page of the failing flow and paste the url here?

 

This will give me the flow identifier so that I can investigate further.

 

 

Thanks!

 

-Travis

CheekyTaurus
Level: Powered On
Power Automate Staff TravisB
Power Automate Staff

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi @CheekyTaurus,

 

We can see that the authorization error is coming from Twitter itself.

 

Can you please navigate to 

https://twitter.com/settings/applications

 

and see if "Microsoft Powerapps and Flow" is in the list of approved applications?

CheekyTaurus
Level: Powered On

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

 
CheekyTaurus
Level: Powered On

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Capture.PNG

 

 

 

 

 

It is. I think I tried revoking and re-authing once, but I'll try it again.

CheekyTaurus
Level: Powered On

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hey @TravisB

 

I checked the flows again this morning after reovking access on twitter.com then recreating the connection and reauthorizing.

 

All flows are still failing.

Power Automate Staff TravisB
Power Automate Staff

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi @CheekyTaurus,

 

Thank you for your help in debugging this!

Quick update: you're definitely not alone in this, but you are the first to bring it to our attention. Thanks for that!

 

It looks like about 1 percent of Twitter users are facing this issue, which is significant. We're currently in investigation as to a fix.

 

We appreciate your patience, I'll bump this thread as I get updates.

CheekyTaurus
Level: Powered On

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Thanks Travis!
Power Automate Staff TravisB
Power Automate Staff

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi @CheekyTaurus,

 

We've narrowed this down to an encoding issue.

 

I don't think there's anything wrong with your connection (can you verify it shows as "Connected" on the connections page?). I think the flow is just failing with a very deceptive error message.

 

What's happening reliably is a strange behavior of the Twitter api where if you send a tweet with both non-ascii encoded characters (generally non-English characters) and ascii characters that need to be encoded (generally non-alphabet characters), the twitter api is returning a "Not Authorized" status.

 

Eg:

漢字 - works

漢字.. - works 

漢字) - does not work (The ')' needs to be url encoded)

aa) - works

 

This explains why your flow would work occassionally once: you'd happen to get one English message out of your rss feed.

 

We're in investigation as to a fix. I'll continue to bump this thread with updates.

 

Best,

Travis

Power Automate Staff TravisB
Power Automate Staff

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi @CheekyTaurus,

 

A fix has been made and is currently in the middle of deployment train to all regions. It may take a couple days to hit yours, but after a couple days (if not already) the issue should resolve itself for you. If it doesn't, please let us know.

 

Thanks again for reporting the issue!

 

-Travis

CheekyTaurus
Level: Powered On

Re: Post a tweet' failing with a '401' - 'Unauthorized' error message

@TravisB fantastic news! I'll keep any eye out. Thanks for the update!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 205 members 6,430 guests
Please welcome our newest community members: