Skip to content

Role assignment schedule instances API Sub 'SubscriptionName' ('SubscriptionId') try #7 Too Many Requests #287

@kaiaschulz

Description

@kaiaschulz

AzGovViz version
please only report bug if you are running the latest version of AzGovViz:
ProductVersion = 'v1_20250430_0'

AzAPICall htParameters:

Name Value


azAccountsVersion n/a
onAzureDevOpsOrGitHubActions True
onGitHubActions False
writeMethod Host
codeRunPlatform AzureDevOps
skipAzContextSubscriptionValidation False
azAPICallModuleVersion 1.3.3.2
debugAzAPICall True
tenantId4AzContext
debugWriteMethod Host
psVersion 7.4.10
onAzureDevOps True
gitHubRepository aka.ms/AzADServicePrincipalInsights
subscriptionId4AzContext xxxxx-xxx-xxx-xxx-xxxxx

CodeRunPlatform
e.g. Console, Azure DevOps, GitHub Action, Cloud Shell, GitHub CodeSpaces ..
Azure DevOps

Describe the bug
A clear and concise description of what the bug is / Paste the error from the script output (replace your tenantId and subscriptionIds)

[AzAPICall 1.3.3.2] Role assignment schedule instances API Sub 'SubscriptionName' ('SubscriptionId') try #7 Too Many Requests
  [AzAPICall 1.3.3.2] DEBUGTASK: Role assignment schedule instances API Sub 'SubscriptionName' ('SubscriptionId') -> try#7 processing: Role assignment schedule instances API Sub 'SubscriptionName' ('SubscriptionId') uri: 'https://management.azure.com/subscriptions/SubscriptionId/providers/Microsoft.Authorization/roleAssignmentScheduleInstances?api-version=2020-10-01'
  [AzAPICall 1.3.3.2] DEBUGTASK: Role assignment schedule instances API Sub 'SubscriptionName' ('SubscriptionId') -> unexpectedError: true
[AzAPICall 1.3.3.2] Role assignment schedule instances API Sub 'SubscriptionName' ('SubscriptionId') try #7 'unexpectedError' occurred (tried 6 times) - unhandledErrorAction: Stop
Exception: /home/vsts/work/1/s/pwsh/AzAdServicePrincipalInsights.ps1:746
Line |
 746 |          $subsToProcessInCustomDataCollectionBatch | ForEach-Object -P …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Error - check the last console output for details

##[error]PowerShell exited with code '1'.

Additional context
Add any other context about the problem here:
Not all pipelines are failing only some of them.
So, I can see the issue just from time to time and I guess I can't really reproduce it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions