【问题标题】:Azure AD How to assign all groups of an existing user to a new user?Azure AD 如何将现有用户的所有组分配给新用户?
【发布时间】:2022-11-26 15:28:14
【问题描述】:

你好,我在 Azure AD 中有一个用户是 50 个组的成员,我希望一个新用户成为同一个 50 个组的成员,有没有办法将新用户添加到所有这 50 个组,而无需一个一个地做?

到目前为止不知道我只能一个一个地添加它们

【问题讨论】:

    标签: azure shell azure-active-directory


    【解决方案1】:

    您可以使用 AzureAD powershell module 和以下 cmdlet 来实现此目的。

    Connect-AzureAD
    Get-AzureADUserMembership -ObjectId "the current user object number you want to copy from" |foreach { Add-AzureADGroupMember -ObjectId $_.ObjectId -RefObjectId " the new user object number here" }
    

    我已经对此进行了测试,并且工作正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-11
      相关资源
      最近更新 更多