Skip to content

Validate resource names against Azure reserved words before provisioning #7745

Description

@spboyer

Problem

Users encounter a ReservedResourceName error from ARM when their chosen project or resource name contains a trademarked or reserved word:

{
  "error": {
    "code": "ReservedResourceName",
    "message": "The resource name 'ai-account-wp3cdsp4fbhhi/ai-project-test-MicrosoftLearnMCPAgent' or a part of the name is a trademarked or reserved word."
  }
}

In this case, the project name MicrosoftLearnMCPAgent contains "Microsoft", which is a substring-match reserved word. This error only surfaces after the ARM deployment call fails, giving users no upfront guidance on what went wrong or how to fix it.

This has been reported by both @jfomhover and @trangevi when using azd / azd ai.

Azure Reserved Resource Names

Azure maintains a published list of reserved words that cannot be used in resource names for resources with accessible endpoints (e.g., FQDN-based resources):

📄 Reference: Resolve errors for reserved resource names

Exact-match reserved words (cannot be the entire name)

ACCESS, APP_CODE, APP_THEMES, APP_DATA, APP_GLOBALRESOURCES, APP_LOCALRESOURCES, APP_WEBREFERENCES, APP_BROWSERS, AZURE, BING, BIZSPARK, BIZTALK, CORTANA, DIRECTX, DOTNET, DYNAMICS, EXCEL, EXCHANGE, FOREFRONT, GROOVE, HOLOLENS, HYPERV, KINECT, LYNC, MSDN, O365, OFFICE, OFFICE365, ONEDRIVE, ONENOTE, OUTLOOK, POWERPOINT, SHAREPOINT, SKYPE, VISIO, VISUALSTUDIO, WEB.CONFIG, XBOX

Substring-match reserved words (cannot appear anywhere in the name)

MICROSOFT, WINDOWS

Start-of-name restriction

LOGIN — cannot be used at the start of a resource name, but can appear later in the name.

Proposed Solution

Add client-side validation of resource names against the reserved word list before making the ARM provisioning call. This would:

  1. Catch invalid names early with a clear, actionable error message
  2. Suggest the user pick a different name
  3. Apply to both azd core flows and azd ai flows where resource names are derived from project/environment names

Additional Context

  • The check is case-insensitive (ARM performs case-insensitive matching)
  • The substring-match words (MICROSOFT, WINDOWS) are the most common cause since they can be embedded in otherwise valid-looking names

Metadata

Metadata

Labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions