首页 > 解决方案 > DestinationAccessException 在 Cloud Foundry 环境中使用 S4 SDK 执行 ODATA V2 调用时出错

问题描述

用于执行调用的目的地被配置为身份验证类型为oAuth2SAMLBearerAssertion,业务用户已经在系统中使用用户 ID、电子邮件和其他基本详细信息。从 SDK 调用执行方法时,出现以下错误:

Caused by: com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to get authentication headers. Destination service returned error: Provided authorization grant is invalid. Exception was No user found with alias 'name@domain.com' (format: unspecified). For more information, consult the kernel traces or the OAuth 2.0 troubleshooting SAP note 1688545.

标签: s4sdk

解决方案


通过在配置的目标中添加以下属性来解决该问题:

nameIdFormat urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress

这里的 nameIdFormat 是附加的属性名称。


推荐阅读