-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Potential Race Condition between creating app and adding secret or granting permissions #23367
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az ad(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adInstallationService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadact-platform-engineering-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az ad(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adInstallationService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadact-platform-engineering-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Related commands
az ad app create
az ad app credential reset
az ad sp create
az ad app permission grant
Describe the bug
There appears to be a race condition e.g. in the time between creating an app and then creating a secret for it or granting permissions to it, Resulting in flaky behaviour where usually the granting of permissions or secret creation will succeed but occasionally it will give errors such as:
To Reproduce
Powershell script that shows this behaviour where roughly 25% of the runs fail.
Expected behavior
Secret value should be written to console, happens most of the time.
But some of the time, secret value will be empty due to suspected race condition, and will output to the console the errors listed above.
Environment summary
az version = 2.34
OS = Windows 10 (build 19044)
Shell type = Windows PowerShell
PS Version = 5.1.19041.1682