azure-sdk-for-ruby icon indicating copy to clipboard operation
azure-sdk-for-ruby copied to clipboard

ARM Unable to use filter argument when trying to list role assignments for AuthorizationManagementClient

Open jeffpereira opened this issue 7 years ago • 5 comments

I am trying to connect to the auth management API and filter a list of role assignments by a principal ID, and the results are not filtered.

tenant_id = '<redacted>'
client_id = '<redacted>'
app_key = '<redacted>'
subscription_id = '<redacted>'
provider = MsRestAzure::ApplicationTokenProvider.new(tenant_id, client_id, app_key)
credentials = MsRest::TokenCredentials.new(provider)
auth_management = Azure::Authorization::Mgmt::V2015_07_01::AuthorizationManagementClient.new(credentials).tap do |client|
  client.subscription_id = subscription_id
end


auth_management.role_assignments.list(filter: "principalId eq <redacted>")

principalID in this case is being set to a string value of the principalId I am wanting to filter by.

Expected Behavior: Should only return role assignments with the principalId passed in the filter option

Actual Behavior: Returns ALL role assignments .

jeffpereira avatar Feb 15 '18 17:02 jeffpereira

I am waiting for response for Service Team. Will update the issue once the service team comes back,

sarangan12 avatar Feb 27 '18 20:02 sarangan12

@sarangan12 I do not believe that this is a service related issue as I am able to perform filters just fine when calling the API directly.

jeffpereira avatar Feb 27 '18 22:02 jeffpereira

Any updates?

jeffpereira avatar Apr 13 '18 17:04 jeffpereira

@jeffpereira I have checked the HTTP logs and thes service response does not include the filtered details when called from the SDK. So, I still think this is a service related issue. I am waiting for the response from service team

sarangan12 avatar May 01 '18 19:05 sarangan12

any updates on this?

jeffpereira avatar Aug 14 '18 20:08 jeffpereira

Thank you for your interest in Azure SDKs. As detailed in this retirement announcement, this repo is no longer supported as of December 31st 2021. Please find the up-to-date list of languages and services supported with Azure SDKs here: https://aka.ms/azsdk

kurtzeborn avatar Jan 11 '23 03:01 kurtzeborn