{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/azure-powershell/issues/4248","repository_url":"https://api.github.com/repos/Azure/azure-powershell","labels_url":"https://api.github.com/repos/Azure/azure-powershell/issues/4248/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-powershell/issues/4248/comments","events_url":"https://api.github.com/repos/Azure/azure-powershell/issues/4248/events","html_url":"https://github.com/Azure/azure-powershell/issues/4248","id":240768130,"number":4248,"title":"Get-AzureRmRoleAssignment returns role assignments from other resource groups when called with Scope and ObjectId parameters","user":{"login":"mgaufman","id":29930240,"avatar_url":"https://avatars1.githubusercontent.com/u/29930240?v=3","gravatar_id":"","url":"https://api.github.com/users/mgaufman","html_url":"https://github.com/mgaufman","followers_url":"https://api.github.com/users/mgaufman/followers","following_url":"https://api.github.com/users/mgaufman/following{/other_user}","gists_url":"https://api.github.com/users/mgaufman/gists{/gist_id}","starred_url":"https://api.github.com/users/mgaufman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgaufman/subscriptions","organizations_url":"https://api.github.com/users/mgaufman/orgs","repos_url":"https://api.github.com/users/mgaufman/repos","events_url":"https://api.github.com/users/mgaufman/events{/privacy}","received_events_url":"https://api.github.com/users/mgaufman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-05T20:34:09Z","updated_at":"2017-07-05T20:34:09Z","closed_at":null,"body":"### Cmdlet(s)\r\nGet-AzureRmRoleAssignment\r\n\r\n### PowerShell Version\r\n5.1.15063.413\r\n\r\n### Module Version\r\nAzureRM.Profile: 3.1.0\r\nAzureRM.Resources: 4.1.0\r\n\r\n### OS Version\r\n10.0.15063.413\r\nAzure Automation\r\n\r\n### Description\r\nGet-AzureRmRoleAssignment returns role assignments from other resource groups when called with Scope and ObjectId parameters.\r\n\r\n### Debug Output\r\nInstructions: to get Debug Output, set `$DebugPreference=\"Continue\"` and then execute the cmdlet or script causing the issue\r\n\r\n### Script/Steps for Reproduction\r\nI've got 2 resource groups, \"RG\" and \"RG01\".\r\nI assign say Reader role to a group with object id 98086144-9b37-4c9b-aa4f-52861a6f51d6 (it's a sample) for the resource group \"RG\". **Resource group \"RG01\" doesn't have Reader role assignments neither directly nor inherited from the subscription level.**\r\nNow I execute Get-AzureRmRoleAssignment -Scope /subscriptions/<my-subscription-id>/resourceGroups/**RG01** -ObjectId 98086144-9b37-4c9b-aa4f-52861a6f51d6.\r\nOutput from this command should be empty but it returns:\r\nRoleAssignmentId: /subscription/...\r\nScope: /subscriptions/555bb974-38bf-45c0-9598-bcbcc59bdbe0/resourceGroups/**RG**\r\nDisplayName: <group-name>\r\nSignInName:\r\nRoleDefinitionName: Reader\r\nRoleDefinitionId: acdd72a7-3385-48ef-bd42-f606fba81ae7\r\nObjectId: 98086144-9b37-4c9b-aa4f-52861a6f51d6\r\nObjectType: Group"}}
{"actor":{"display_login":"mgaufman"}}