Created
December 12, 2022 15:06
-
-
Save ivanbuzyka/a3de800dd357eca8078eab64f6794190 to your computer and use it in GitHub Desktop.
Login to the Azure AD Tenant with no Azure Subscription. Create a lot of Azure AD Groups and add a user as member to them. This can be used to test Azure AD authentication for scenarios when a lot of Groups are send by Claims
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$userId = "<ObjectID of AAD User>" | |
$countOfGroupsToCreate = 300 | |
$groupNamePrefix = "testgroup" | |
for ($i = 0; $i -lt $countOfGroupsToCreate; $i++) | |
{ | |
$newGroup = (az ad group create --display-name "$groupNamePrefix-group$i" --mail-nickname "$groupNamePrefix-group$i" -o json) | ConvertFrom-Json | |
az ad group member add --group $newGroup.Id --member-id $userId | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az login --tenant testtenant.onmicrosoft.com --allow-no-subscriptions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment