Open vnextcoder opened 4 years ago
@vnextcoder , I guess object id used in script is /subscriptions/XXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/trg2/secretstore
. It is not specific to one object. In general, path should be /subscriptions/{sub}/resourceGroups/{rg}/resourceType/{resource-name}
. It's reason it shows the number of elements in path is incorrect. Please double check.
I haven't used any @Scope ParamSet.
However, I am using Resource Name, ResourceType and ResourceGroup parameters to this CmdLet. It is only when there is incorrect ResourceType provided, the CmdLet gets confused and reports unrelated error.
If scope is not set in script, scope is the combination of other inputs. According to current implementation, resource type is resource provider, slash, and resource type, such as Microsoft.Storage/storageAccounts
. Please try again.
You are right that the error message is not accurate to user.
Thats the whole point of raising this Issue to avoid people spending their time in finding out problems behind incorrect Errors reported.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.
Service team, please look into it and help to make the error message more friendly.
I can only agree, it would be nice to have this improved.
@armleads-azure - Following up to see if there is any update on this issue? - Thank you
Completely agreed, the following error message "should have even number of parts" don't give any ideas on what wrong.
Hi I have similar problem with Get-AZRoleAssignment, any update?
Description
https://github.com/Azure/azure-powershell/blob/master/src/Resources/Resources/help/New-AzRoleAssignment.md
New-AZRoleAssignment Below ParameterSet doesn't work as expected if the ResourceType is specified incorrectly.
I specified Microsoft.Storage, but rather than saying the Resource Type is incorrect, it is saying Number of Parameters need to be Even.
ResourceWithObjectIdParameterSet New-AzRoleAssignment -ObjectId -ResourceGroupName -ResourceName
-ResourceType [-ParentResource ] -RoleDefinitionName [-AllowDelegation]
[-DefaultProfile ] []
Steps to reproduce
Environment data
Module versions
Debug output
Error output