Skip to content
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

Search-AzGraph : {"error": { "code": "AccessDenied"... #255

Open
ctahok opened this issue Jan 21, 2025 · 1 comment
Open

Search-AzGraph : {"error": { "code": "AccessDenied"... #255

ctahok opened this issue Jan 21, 2025 · 1 comment

Comments

@ctahok
Copy link

ctahok commented Jan 21, 2025

Hi there,

Can you please help with errors below:
`PS C:\Windows\system32> Invoke-ARI -TenantID a713fb80-e626-34656-3827488d953a
Checking for Powershell Module Updates..
PowerShell Desktop Identified. AzureCloud Please select the account you want to login with. Retrieving subscriptions for the selection... Extracting Subscriptions from Tenant a713fb80-e626-34656-3827488d953a
Starting Resource Extraction.. Search-AzGraph : { "error": { "code": "AccessDenied", "message": "Please provide below info when asking for support: timestamp = 2025-01-21T15:17:23.9244528Z, correlationId = eebe4e4e-ebc4-4550-b68a-9661b9f9c7e9.", "details": [ { "code": "AccessDenied", "message": "Access is denied to the requested resource. The user might not have enough permission." } ] } } At C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.15\Modules\Core\ARIInventoryLoop.psm1:71 char:36 + ... eryResult = Search-AzGraph -Query $GraphQuery -first 1000 -Subscripti ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Search-AzGraph], ErrorResponseException + FullyQualifiedErrorId : AccessDenied,Microsoft.Azure.Commands.ResourceGraph.Cmdlets.SearchAzureRmGraph Search-AzGraph : { "error": { "code": "AccessDenied", "message": "Please provide below info when asking for support: timestamp = 2025-01-21T15:17:24.1809829Z, correlationId = f10ddab9-42e0-419b-8c2e-70bd7a24f00f.", "details": [ { "code": "AccessDenied", "message": "Access is denied to the requested resource. The user might not have enough permission." } ] } } At C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.15\Modules\Core\ARIInventoryLoop.psm1:71 char:36 + ... eryResult = Search-AzGraph -Query $GraphQuery -first 1000 -Subscripti ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Search-AzGraph], ErrorResponseException + FullyQualifiedErrorId : AccessDenied,Microsoft.Azure.Commands.ResourceGraph.Cmdlets.SearchAzureRmGraph Search-AzGraph : { "error": { "code": "AccessDenied", "message": "Please provide below info when asking for support: timestamp = 2025-01-21T15:17:24.4914197Z, correlationId = 0af5d5b1-5de7-4396-87c1-d83a6710bd14.", "details": [ { "code": "AccessDenied", "message": "Access is denied to the requested resource. The user might not have enough permission." } ] } } At C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.15\Modules\Core\ARIInventoryLoop.psm1:71 char:36 + ... eryResult = Search-AzGraph -Query $GraphQuery -first 1000 -Subscripti ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Search-AzGraph], ErrorResponseException + FullyQualifiedErrorId : AccessDenied,Microsoft.Azure.Commands.ResourceGraph.Cmdlets.SearchAzureRmGraph Search-AzGraph : { "error": { "code": "AccessDenied", "message": "Please provide below info when asking for support: timestamp = 2025-01-21T15:17:24.8084139Z, correlationId = 2f96aa2e-c891-48d9-b79f-66e256d74254.", "details": [ { "code": "AccessDenied", "message": "Access is denied to the requested resource. The user might not have enough permission." } ] } } At C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.15\Modules\Core\ARIInventoryLoop.psm1:71 char:36 + ... eryResult = Search-AzGraph -Query $GraphQuery -first 1000 -Subscripti ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Search-AzGraph], ErrorResponseException + FullyQualifiedErrorId : AccessDenied,Microsoft.Azure.Commands.ResourceGraph.Cmdlets.SearchAzureRmGraph Search-AzGraph : { "error": { "code": "AccessDenied", "message": "Please provide below info when asking for support: timestamp = 2025-01-21T15:17:25.1637816Z, correlationId = e0f4fe11-ae22-4a97-9af0-acbc2e97060d.", "details": [ { "code": "AccessDenied", "message": "Access is denied to the requested resource. The user might not have enough permission." } ] } } At C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.15\Modules\Core\ARIInventoryLoop.psm1:71 char:36 + ... eryResult = Search-AzGraph -Query $GraphQuery -first 1000 -Subscripti ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Search-AzGraph], ErrorResponseException + FullyQualifiedErrorId : AccessDenied,Microsoft.Azure.Commands.ResourceGraph.Cmdlets.SearchAzureRmGraph Search-AzGraph : { "error": { "code": "AccessDenied", "message": "Please provide below info when asking for support: timestamp = 2025-01-21T15:17:25.4293193Z, correlationId = c07ea65c-60d5-4231-ac0e-9157378deea6.", "details": [ { "code": "AccessDenied", "message": "Access is denied to the requested resource. The user might not have enough permission." } ] } } At C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.15\Modules\Core\ARIInventoryLoop.psm1:71 char:36 + ... eryResult = Search-AzGraph -Query $GraphQuery -first 1000 -Subscripti ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Search-AzGraph], ErrorResponseException + FullyQualifiedErrorId : AccessDenied,Microsoft.Azure.Commands.ResourceGraph.Cmdlets.SearchAzureRmGraph Search-AzGraph : { "error": { "code": "BadRequest", "message": "Please provide below info when asking for support: timestamp = 2025-01-21T15:17:25.7837320Z, correlationId = 4e354649-62ea-4703-b6d7-23e7014c82c6.", "details": [ { "code": "InvalidQuery", "message": "Query is invalid. Please refer to the documentation for the Azure Resource Graph service and fix the error before retrying." }, { "code": "ParserFailure", "message": "ParserFailure" }, { "code": "ParserFailure", "message": "ParserFailure" }, { "code": "ParserFailure", "message": "ParserFailure" }, { "code": "ParserFailure", "message": "ParserFailure" }, {
"code": "ParserFailure",
"message": "ParserFailure"
},
{
"code": "ParserFailure",
"message": "ParserFailure"
}
]
}
}
At C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.15\Modules\Core\ARIInventoryLoop.psm1:71 char:36

  • ... eryResult = Search-AzGraph -Query $GraphQuery -first 1000 -Subscripti ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [Search-AzGraph], ErrorResponseException
    • FullyQualifiedErrorId : BadRequest,Microsoft.Azure.Commands.ResourceGraph.Cmdlets.SearchAzureRmGraph
      The property 'HorizontalAlignment' cannot be found on this object. Verify that the property exists and can be set.
      At C:\Program Files\WindowsPowerShell\Modules\ImportExcel\7.8.10\Public\Set-ExcelRange.ps1:107 char:17
  • ... $Range.Style.HorizontalAlignment = $HorizontalAlignment
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyNotFound

The property 'Format' cannot be found on this object. Verify that the property exists and can be set.
At C:\Program Files\WindowsPowerShell\Modules\ImportExcel\7.8.10\Public\Set-ExcelRange.ps1:128 char:17

  • ... $Range.Style.Numberformat.Format = (Expand-NumberFormat $ ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyNotFound

WARNING: Failed autosizing columns of worksheet 'Subscriptions': You cannot call a method on a null-valued expression.
WARNING: Failed adding PivotTable 'P0': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P0': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P1': Index operation failed; the array index evaluated to null.
WARNING: Failed adding chart for pivotable 'P1': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P2': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P2': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P3': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P3': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P4': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P4': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P6': Index operation failed; the array index evaluated to null.
WARNING: Failed adding chart for pivotable 'P6': Cannot bind argument to parameter 'PivotTable' because it is null.
Report Complete. Total Runtime was: .38 Minutes
Total Resources: 0
Total Advisories: 0
Total Policies: 0

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2025-01-21_15_17.xlsx

Draw.io Diagram file saved at: C:\AzureResourceInventory\AzureResourceInventory_Diagram_2025-01-21_15_17.xml`

@Claudio-Merola
Copy link
Collaborator

hello @ctahok

Are you running the script as administrator?

Also, are you running it on Windows Powershell or Powershell Core?

May you run the script using the -Debug parameter? So we can have more details on what might be going wrong there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants