Based on the error message it appears that there is something wrong how you're setting your 'resource group name'. Can you please share the powershell command you are using to set the resource group name? Also, Are you trying to create a new resource group or modify and existing one?
The New-AzWebApp
cmdlet creates an Azure Web App in a given a resource group that uses the specified App Service plan and data center.
Example: New-AzWebApp -ResourceGroupName Default-Web-WestUS -Name "ContosoSite" -Location "West US" -AppServicePlan "ContosoServicePlan"
This command creates an Azure Web App named ContosoSite in the existing resource group named Default-Web-WestUS in data center West US. The command uses an existing App Service plan named ContosoServicePlan.
If you want to set a resource group use Set-AzResourceGroup
. The Set-AzResourceGroup cmdlet modifies the properties of a resource group. You can use this cmdlet to add, change, or delete the Azure tags applied to a resource group. Specify the Name parameter to identify the resource group and the Tag parameter to modify the tags. You cannot use this cmdlet to change the name of a resource group.
Hope that helps.
Grace