Set-AWSSamlRoleProfile失败,并显示“无法设置凭据:“选择”应至少包含一个元素。”错误

时间:2019-04-07 01:55:03

标签: amazon-web-services powershell saml federated-identity aws-toolkit

我正在尝试使用PowerShell使联盟用户访问AWS API。 (下面提供了链接)

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

感谢任何帮助或指导。

1 个答案:

答案 0 :(得分:0)

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

希望它对其他人有帮助。