This error usually appears when you are not logged into the Xbox services. While this is not required when playing on Steam, it is required to play Age of Empires: Definitive Edition on the Microsoft Store and to unlock any achievements on your profile.
First, work through these steps to ensure you are connected to the Xbox servers:
🛠 Make sure you are connected to the internet.
You will not be able to access multiplayer aspects of the game via the Microsoft Store if you are offline.
🛠 Sign in to your Xbox account via the Xbox app.
You can download and install the Xbox App via the Microsoft Store. Once downloaded, log in to the app using the Xbox Live credentials where you purchased the game. (Note: If you don’t have a free Xbox account, you can create a free Xbox account. Make sure to link your new Xbox Live account to the Microsoft account you used to purchase Age of Empires: Definitive Edition.)
🛠 Allow incoming communications in your firewall settings
Ensure that TCP Port 8888 and UDP Port 9999, as well as Port 3478 (UDP & TCP) and Port 5222 (UDP & TCP) are open and forwarded.
If all of the above solutions fail to address the problem, visit the Fix gaming issues with the Xbox app for Windows for additional troubleshooting tips and support.