Set-AWSSamlRoleProfile 失败,"Unable to set credentials: "choices" should have at least an element."错误

Set-AWSSamlRoleProfile fails with "Unable to set credentials: "choices" should have at least one element." error

我正在尝试使用 PowerShell 让联合用户访问 AWS API。 (下面提供Link)

AWS 已正确配置为与 AD 一起使用。 (它适用于我的一群同事)

我正在使用 PowerShell script 访问 AWS API。

当我尝试 运行 命令 Set-AWSSamlRoleProfile 时出现问题。

错误:

C:\Windows\system32> Set-AWSSamlRoleProfile -EndpointName $EndpointName -PrincipalARN $PrincipalARN -RoleARN $RoleARN -StoreAs 'SAMLUser' > $null

Set-AWSSamlRoleProfile : Unable to set credentials: "choices" should have at least one element.

At line:1 char:1

+ Set-AWSSamlRoleProfile -EndpointName $EndpointName -PrincipalARN $Pri ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (Amazon.PowerShe...leProfileCmdlet:SetSamlRoleProfileCmdlet) [Set-AWSSamlRoleProfile], ArgumentException

    + FullyQualifiedErrorId : ArgumentException,Amazon.PowerShell.Common.SetSamlRoleProfileCmdlet

感谢任何帮助或指导。

就我而言,问题是用户(我)不属于 AD 组。

希望对其他人有所帮助。