Update-EntraBetaUserFromFederated

将最近从单一登录(也称为联合身份验证)转换为标准身份验证类型的域中的用户。

语法

CloudOnlyPasswordScenarios (默认值)

Update-EntraBetaUserFromFederated

    -UserPrincipalName <String>
    [<CommonParameters>]

HybridPasswordScenarios

Update-EntraBetaUserFromFederated

    -UserPrincipalName <String>
    -NewPassword <SecureString>
    [<CommonParameters>]

说明

该 Update-EntraBetaUserFromFederated cmdlet 用于将最近从单一登录(也称为联合身份验证)转换为标准身份验证类型的域中的用户。 必须为用户提供新密码。

此过程更新Microsoft Entra ID中的密码,如果启用了密码写回,则将其同步到本地 Active Directory。 管理员可以设置新密码或让系统生成一个密码。 用户必须在下次登录时对其进行更改。

在工作或学校帐户的委托方案中,登录用户必须具有受支持的Microsoft Entra角色或具有所需权限的自定义角色。 此操作的最低特权角色为:

  • 身份验证管理员
  • 特权身份验证管理员

对于委派方案,管理员至少需要身份验证管理员或特权身份验证管理员Microsoft Entra角色。

具有User Administrator或Helpdesk AdministratorPassword Administrator角色的管理员可以为非管理员用户重置密码。

混合密码设置需要新密码。 如果为仅限云的密码省略,则返回系统生成的密码。 它是 Unicode 字符串,根据租户的禁止密码列表进行验证,并且必须满足云和/或本地密码策略。

示例

示例 1:更新域中的用户

Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All'
Update-EntraBetaUserFromFederated -UserPrincipalName 'pattifuller@contoso.com'
Name                           Value
----                           -----
newPassword                    HuHu8765
@odata.context                 https://graph.microsoft.com/beta/$metadata#microsoft.graph.passwordResetResponse

此命令更新域中的用户。 系统生成并返回密码。

  • -UserPrincipalName参数指定要转换的用户的 Microsoft Entra ID UserID。

示例 2:更新域中的用户密码

Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All'
$newPassword = '<strong-password>'
$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force
Update-EntraBetaUserFromFederated -UserPrincipalName 'pattifuller@contoso.com' -NewPassword $securePassword

此命令通过为混合方案提供密码来更新域中的用户。

  • -UserPrincipalName参数指定要转换的用户的 Microsoft Entra ID UserID。
  • -NewPassword 参数指定用户的新密码。

参数

-NewPassword

用户的新密码。

对于使用混合密码方案的租户,需要指定新密码。 如果省略仅限云帐户的密码,系统会自动生成一个密码。 此生成的密码是不包含其他编码的 Unicode 字符串。 在接受之前,根据租户的禁止密码列表验证密码,并且必须满足租户的云和/或本地密码要求。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:2
必需:False
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-UserPrincipalName

要转换的用户Microsoft Entra ID UserID。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False
别名:UserId, Identity, UPN, 对象标识符 (ObjectId)

参数集

(All)
Position:1
必需:True
来自管道的值:True
来自管道的值(按属性名称):True
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。

备注