-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: The type eq 'subscription' or type eq 'managementgroup' filter is invalid. #217
Comments
@patkiamit thanks for reporting, but it sounds odd :) Does this happen every time you run it? What happens if you run this? $uri = 'https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources?$select=id%2cdisplayName%2ctype%2cexternalId&$expand=parent&$filter=(type+eq+%27subscription%27+or+type+eq+%27managementgroup%27)'
invoke-azrestmethod -uri $uri |
Hi, thanks for the reply, I tested above URL and was able to get the output , still 28th NOV all work well no issue it started from y'day Headers : {[Transfer-Encoding, System.String[]], [Strict-Transport-Security, System.String[]], [request-id, System.String[]], [client-request-id, System.String[]]...} |
@patkiamit I was able to reproduce the issue on my side as well. |
i run URL separately with skiptoken as well, and it runs without issue , but in script, it always fails |
Hi @patkiamit, How were you able to use the url with skiptoken? In my case, OUTPUT: {"error":{"code":"InvalidFilter","message":"The type eq 'subscription' or type eq 'managementgroup' filter is invalid.","innerError":{"date":"2023-11-30T11:12:46","request-id":"x,"client-request-id":"y"}}} Nevertheless, without {"error":{"code":"InvalidFilter","message":"The filter is invalid.","innerError":{"date":"2023-11-30T11:26:57","request-id":"xx","client-request-id":"yy"}}} |
yes, I am running a script in a large tenant having many subscriptions, do we have any workaround for it? |
meanwhile seeing/hearing this from other tenants, too. Workaround until the issue is fixed: use the parameter Using a beta Microsoft Graph API here which is announced for deprecation; elaboration migration path to Azure Resource Manager (ARM) API |
reopen for reference / to be closed when fixed |
Hey @JulianHayward, |
hey @kaiaschulz - no progress, yet :( |
Love the tool! We're also hitting this. Keeping an eye on the thread. |
AzGovViz version
6.3.4
CodeRunPlatform
Azure DevOps,
Describe the bug
azure DevOps pipeline failed with the below error
Screenshots
2023-11-29T11:46:00.5004337Z !f97434b8 Please report at aka.ms/AzGovViz and provide the following dump
2023-11-29T11:46:00.5014629Z [AzAPICallErrorHandler 1.1.84] Get PIM onboarded Subscriptions and Management Groups try #1; uri:"https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources?$select=id%2cdisplayName%2ctype%2cexternalId&$expand=parent&$filter=(type+eq+%27subscription%27+or+type+eq+%27managementgroup%27)&$skiptoken=b4NY2ZLEyNFBEHQKBIVA"; return: (StatusCode: '400' (BadRequest)) <.code: ''> <.error.code: 'InvalidFilter'> | <.message: ''> <.error.message: 'The type eq 'subscription' or type eq 'managementgroup' filter is invalid.'> - (plain : @{error=}) - AzAPICall: Stop
2023-11-29T11:46:00.5019099Z Parameters:
2023-11-29T11:46:00.5026304Z accountType:ServicePrincipal
2023-11-29T11:46:00.5049562Z ARMLocations:asia asiapacific australia australiacentral australiacentral2 australiaeast australiasoutheast brazil brazilsouth brazilsoutheast brazilus canada canadacentral canadaeast centralindia centralus centraluseuap centralusstage eastasia eastasiastage eastus eastus2 eastus2euap eastus2stage eastusstage eastusstg europe france francecentral francesouth germany germanynorth germanywestcentral global india israelcentral italynorth japan japaneast japanwest jioindiacentral jioindiawest korea koreacentral koreasouth northcentralus northcentralusstage northeurope norway norwayeast norwaywest polandcentral qatarcentral singapore southafrica southafricanorth southafricawest southcentralus southcentralusstage southcentralusstg southeastasia southeastasiastage southindia sweden swedencentral switzerland switzerlandnorth switzerlandwest uae uaecentral uaenorth uk uksouth ukwest unitedstates unitedstateseuap westcentralus westeurope westindia westus westus2 westus2stage westus3 westusstage
2023-11-29T11:46:00.5059455Z azAccountsVersion:n/a
2023-11-29T11:46:00.5069080Z azAPICallModuleVersion:1.1.84
2023-11-29T11:46:00.5078287Z azureCloudEnvironment:AzureCloud
2023-11-29T11:46:00.5087616Z codeRunPlatform:AzureDevOps
2023-11-29T11:46:00.5097099Z debugAzAPICall:False
2023-11-29T11:46:00.5116015Z debugWriteMethod:Host
2023-11-29T11:46:00.5124248Z DoAzureConsumption:False
2023-11-29T11:46:00.5133744Z DoNotIncludeResourceGroupsAndResourcesOnRBAC:False
2023-11-29T11:46:00.5143333Z DoNotIncludeResourceGroupsOnPolicy:False
2023-11-29T11:46:00.5152765Z DoNotShowRoleAssignmentsUserData:True
2023-11-29T11:46:00.5406294Z DoPSRule:False
2023-11-29T11:46:00.5418259Z GitHubActionsOIDC:False
2023-11-29T11:46:00.5427382Z gitHubRepository:aka.ms/AzGovViz
2023-11-29T11:46:00.5436805Z HierarchyMapOnly:False
2023-11-29T11:46:00.5447107Z LargeTenant:True
2023-11-29T11:46:00.5458207Z ManagementGroupsOnly:False
2023-11-29T11:46:00.5467439Z NoALZPolicyVersionChecker:False
2023-11-29T11:46:00.5476917Z NoJsonExport:False
2023-11-29T11:46:00.5486003Z NoMDfCSecureScore:True
2023-11-29T11:46:00.5496596Z NoNetwork:False
2023-11-29T11:46:00.5507005Z NoPolicyComplianceStates:False
2023-11-29T11:46:00.5516080Z NoResourceProvidersAtAll:True
2023-11-29T11:46:00.5525011Z NoResourceProvidersDetailed:False
2023-11-29T11:46:00.5534091Z NoResources:False
2023-11-29T11:46:00.5543454Z NoStorageAccountAccessAnalysis:False
2023-11-29T11:46:00.5561542Z onAzureDevOps:True
2023-11-29T11:46:00.5569978Z onAzureDevOpsOrGitHubActions:True
2023-11-29T11:46:00.5586796Z onGitHubActions:False
2023-11-29T11:46:00.5595841Z PolicyAtScopeOnly:True
2023-11-29T11:46:00.5614891Z ProductVersion:6.3.4
2023-11-29T11:46:00.5631170Z PSRuleFailedOnly:False
2023-11-29T11:46:00.5649071Z psVersion:7.2.16
2023-11-29T11:46:00.5656990Z RBACAtScopeOnly:True
2023-11-29T11:46:00.5675034Z skipAzContextSubscriptionValidation:False
2023-11-29T11:46:00.5692046Z subscriptionId4AzContext:undefined
2023-11-29T11:46:00.5708654Z subscriptionQuotaId:EnterpriseAgreement_2014-09-01
2023-11-29T11:46:00.5726085Z tenantId4AzContext:undefined
2023-11-29T11:46:00.5734626Z ThrottleLimit:10
2023-11-29T11:46:00.5743830Z userType:n/a
2023-11-29T11:46:00.5752921Z writeMethod:Host
2023-11-29T11:46:00.5759010Z [AzAPICallErrorHandler 1.1.84] Get PIM onboarded Subscriptions and Management Groups try #1; uri:"https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources?$select=id%2cdisplayName%2ctype%2cexternalId&$expand=parent&$filter=(type+eq+%27subscription%27+or+type+eq+%27managementgroup%27)&$skiptoken=b4NY2ZLEyNFBEHQKBIVA"; return: (StatusCode: '400' (BadRequest)) <.code: ''> <.error.code: 'InvalidFilter'> | <.message: ''> <.error.message: 'The type eq 'subscription' or type eq 'managementgroup' filter is invalid.'> - unhandledErrorAction: Stop
2023-11-29T11:46:00.6338041Z �[31;1mException:
2023-11-29T11:46:00.6338477Z �[36;1mLine |
2023-11-29T11:46:00.6339082Z �[36;1m 832 | �[0m �[36;1mThrow 'Error - check the last console output for details'�[0m
2023-11-29T11:46:00.6340173Z �[36;1m | �[31;1m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-11-29T11:46:00.6340986Z �[31;1m�[36;1m | �[31;1mError - check the last console output for details�[0m
2023-11-29T11:46:00.7383355Z ##[error]PowerShell exited with code '1'.
2023-11-29T11:46:00.7434406Z ##[section]Finishing: Run Azure Governance Visualizer
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: