Troubleshooting "AADSTS90015: Requested query string is too long" error while accepting Bitbucket Cloud invitation using the Microsoft sign-in button
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
This knowledge base article will explain the issue users encounter while accepting a Bitbucket Cloud invitation using the Microsoft Sign-In button, resulting in the error message: "AADSTS90015: Requested query string is too long".

Cause
This occurs when the URL being used to authenticate with Microsoft Azure Active Directory (AAD) contains a query string that is too long. This error is commonly seen when trying to authenticate with AAD using a URL longer than the maximum allowed length of 2048 characters.
Solution
If you encounter this issue, there are two options you can try:
Option 1: Manually sign in to Bitbucket before opening the link:
Sign in to Bitbucket.org using the Microsoft sign-in option.
Make sure you are logged in.
Open the invitation link by clicking or copying and pasting it into a new tab.
You should see an option to accept the invitation to join the workspace.
Accept the invitation to join the workspace.
Option 2: Decode the URL to shorten it using a URL decoder:
Right-click on the "Accept my invitation" button and copy the link.
Go to a URL decoder tool like "https://meyerweb.com/eric/tools/dencoder/" or "https://www.urldecoder.io/".
Paste the copied link into the decoder tool.
The decoded URL will look like:
1
https://id.atlassian.com/signup/invite?application=bitbucket&continue=https://bitbucket.org/account/signin/?next=https://bitbucket.org/invitations/account/<some string>&signature=<some string>
Remove the following part from the URL:
1
https://id.atlassian.com/signup/invite?application=bitbucket&continue=
The shortened URL should look like this:
1
https://bitbucket.org/account/signin/<....>
ℹ️ If you don't want to use the suggested URL decoder, you can manually decode it yourself using URL Decoder
Was this helpful?