A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Dear @Muhammad Zubair,
Thank you for providing the screenshot and additional details.
Based on the screenshot, I can see that Excel is currently showing "Unlicensed Product", and the sign-in process appears to complete successfully through email, password, and MFA before failing with the generic "Something went wrong" message.
Since the authentication flow reaches the MFA stage, this suggests the issue may not be with the account credentials themselves, but rather with Office activation, cached identity tokens, or the sign-in/licensing components on the EC2 instance.
I would recommend the following checks:
- Verify that the same account can successfully sign in at:
- Microsoft 365 Portal
- Outlook on the web
- Office.com
- If web sign-in works, it helps confirm that the account and license are still valid.
- Sign out of all Office applications and remove stored Microsoft credentials:
- Open Credential Manager > Windows Credentials
- Remove Microsoft 365 / Office / Azure AD related entries
- Restart the EC2 instance
- Attempt to sign in again
- Check whether the same behavior occurs in other Office applications such as: Word, PowerPoint, ... If all Office apps fail with the same message, the issue is more likely related to Office activation or identity services rather than Excel itself.
- Update Microsoft 365 Apps: File > Account > Update Options > Update Now
Since this is an AWS EC2 environment, verify that there are no proxy, firewall, SSL inspection, or network restrictions preventing Office from reaching Microsoft licensing and authentication endpoints.
Could you also confirm:
- The Windows Server / Windows version running on the EC2 instance?
- Whether this issue affects only one user or multiple users on the server?
- Whether Word and PowerPoint show the same sign-in error?
If the issue persists after the steps above, I recommend opening a support ticket from the Microsoft 365 Admin Center.
You can raise support ticket from Microsoft 365 Admin Center>Support>Help & Support.
For reference: Get support | Microsoft Docs
When creating the ticket, include:
- The screenshot provided above.
- Your Microsoft 365 Apps for Enterprise version.
- The Windows version.
- Confirmation that MFA completes successfully before the error appears.
- Whether the same issue occurs in other Office applications.
Because this is an activation and authentication issue occurring after a successful sign-in flow, Microsoft Support can review tenant-specific activation diagnostics and licensing logs that are not available through the community forum.
I hope this information helps point you in the right direction. If you run into any issues while trying the steps, or if something still doesn’t feel quite right, please don’t hesitate to reach out again. I’ll do my best to support you however I can.
Looking forward to hearing back from you with any updates or additional details.
Warm regards,
If the answer is helpful, please select "Yes" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.