Share via

VM Failing Deployment

Jeffrey Cummings 0 Reputation points
2026-02-19T19:54:00.9466667+00:00

Hi - when i try to deploy a VM it keeps erroring out saying request headers are too long? I tried in an incognito tab and clearing my cookies and had the same issue

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Manish Deshpande 4,225 Reputation points Microsoft External Staff Moderator
    2026-02-20T02:11:24.48+00:00

    Hello Jeffrey,

    Thank you for sharing the details. The “Request headers are too long” error during VM deployment is not related to the VM configuration itself. This is a client-side authentication/token issue that can occur in the Azure portal.

    When deploying a VM through the Azure portal, the request includes an authentication token. If that token becomes too large (for example, due to:

    • membership in a large number of Microsoft Entra ID (Azure AD) groups, or
    • accumulated authentication claims/cookies),

    the portal request can exceed the HTTP header size limit, causing the deployment to fail with:

    HTTP 400 – Request headers are too long

    This explains why the issue can persist even after clearing cookies or using an incognito window.

    **Steps to perform:

    Deploy using Azure CLI or ARM/Bicep**

    • Deploying via Azure CLI, PowerShell, or ARM/Bicep templates avoids the portal’s browser-based token size limitation and is the most reliable workaround.

    Azure CLI VM deployment example:

    az vm create --resource-group <RG> --name <VMName> --image UbuntuLTS --admin-username azureuser
    
    
    

    Reduce token size (if applicable)

    • If your account is a member of many Entra ID groups, reducing unnecessary group memberships can shrink the token and prevent the error. Large group claims are a known cause of this behavior

    Option 3 – Try a different user account

    • Using an account with fewer Entra ID group memberships can also help isolate and resolve the issue.

    This is a portal-side authentication header limitation, not a VM deployment fault.

    Links:
    https://stackoverflow.com/questions/46100272/azure-portal-bad-request-request-too-long

    Thanks,
    Manish Deshpande.

    0 comments No comments

  2. TP 150.9K Reputation points Volunteer Moderator
    2026-02-19T20:03:38.3466667+00:00

    Hi Jeffrey,

    Usually this is caused by the bearer token being too large as a result of the user having many role assignments, membership in security groups, etc.

    As a test, please create a new Entra ID user and assign in=t Owner role to your subscription. Sign in using this test account and try to create the VM. If it succeeds take a look at your original user account and see if you can reduce role assignments and group memberships.

    Another way you can verify the issue is using Developer tools and check how large the Authorization header is.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.