Share this article

Improve this guide

AADSTS51004 error on Teams: how to fix it

The AADSTS51004 Teams error is not so common, but there’s a simple fix.

2 min. read

Updated onOctober 4, 2023

updated onOctober 4, 2023

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Key notes

Microsoft Teamsmight be the most popularapp for working. The app now has a lot of excellent AI-based features that allow you to work efficiently. You can useAI recap,to quickly summarize a meeting. You can createorganizational charts, and use them to build a better workflow. All these are in Microsoft Teams.

If you can log in, of course. Why we’re saying this? Well, there is a particularly stressful bug that you can run into sometimes on Teams. We’re talking aboutthe AADSTS51004 error.

The AADSTS51004 Teams error happens in various forms. But they all have the same issue. There is a problem while trying to sign up to Microsoft website, a Microsoft app, such as Teams, or even a Microsoft could, such as OneDrive.

When the signing up fails, there are a lot of times when this particular error shows up. It can appear like thisAADSTS51004: The user account 4ZtVnLfa9UfSXjKe/32NLQ== does not exist in the 4842004-47b3-4aso-8f12-797e13d1-y823 directory. To sign into this application, the account must be added to the directory.And it can appear simply like thisAADSTS51004: The user account ….

How to fix the AADSTS51004 Teams error

How to fix the AADSTS51004 Teams error

First, this error means that the user account doesn’t exist in the Microsoft account directory. A Microsoft application, in our case Teams, likely chose the wrong tenant to sign into. And now, the currently logged-in user was prevented from doing so since it doesn’t have a tenancy.

What to do then? Well, if this user should be able to log in, add them as a guest.

To add B2B collaboration users to the directory, you need to follow these steps.

From there you can add the existing profile and customize it. Ultimately you can add a tenancy to it, and then it will be all good.

However, the simplest solution to this would be to check if your account still has aMicrosoft 365 tenancy, and if not, then renew it.

We hope you found these solutions useful. Be sure to let us know if it worked in the comments section below.

More about the topics:Microsoft Teams,Windows 11

Flavius Floare

Tech Journalist

Flavius is a writer and a media content producer with a particular interest in technology, gaming, media, film and storytelling.

He’s always curious and ready to take on everything new in the tech world, covering Microsoft’s products on a daily basis. The passion for gaming and hardware feeds his journalistic approach, making him a great researcher and news writer that’s always ready to bring you the bleeding edge!

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Flavius Floare

Tech Journalist

Flavius is a writer and a media content producer with a particular interest in technology, gaming, media, film and storytelling.