Hi Chittajallu, Mohan Krishna,
Thanks for reaching out to Microsoft Q&A.
- Ensure your account has the correct role assignment (Owner or Contributor) for the subscription in Azure, as this might vary across different tools. Check your role in subs using the code below:
- Get-AzRoleAssignment -Scope "/subscriptions/<SubscriptionID>" -PrincipalName "<YourEmail>"
- Ensure that the required resource providers are registered in your subscription. Sometimes, certain providers (like
Microsoft.Resources
) need to be manually registered, if not registered do it useing:- Register-AzResourceProvider -ProviderNamespace Microsoft.Resources
- There could be an issue with the token you are using in PowerShell being expired or not properly refreshed, try re-authenticating.
- There could be an Azure Policy or management group rule restricting actions via certain methods (like PowerShell) but allowing actions via the portal. You can check if any policies are being enforced:
Get-AzPolicyAssignment
- Ensure that you are not hitting any subscription or resource group creation limits, although this would usually result in a different error code.
- If you're using a Visual Studio subscription, permissions or policies specific to this subscription might apply differently. Double-check the permissions specific to the Visual Studio subscription for your account.
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.