Reading different subscription than specified
aaron-baron opened this issue · 2 comments
I have billing Admin rights on one subscription and access to read a Resource Group on another.
When I try to run "aztfexport resource "sub1" the client tries to read from sub2.
I have also tried "aztfexport map map.txt" with a mapping file that specifies the resource with "sub1". Same error.
Here is the error message:
"Error: reading resource group: resources.GroupsClient#Get: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client
'EMAIL@EMAIL.COM' with object id 'OBJECTID' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope 'sub2' or the scope is invalid. If access was recently granted, please refresh your credentials."
Any solution?
Did you specify the subscription id via --subscription-id
?
Yes, that did fix the problem - thanks.