我正在尝试使用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
感谢任何帮助或指导。
答案 0 :(得分:0)
就我而言,问题是用户(我)不属于AD的组。
希望它对其他人有帮助。