对于 SSO/SAML 登录,从 Azure 获取 displayName 到 Google Identity Platform

gae*_*fan 5 saml azure single-sign-on azure-active-directory google-cloud-platform

我使用 Google Identity Platform 和 FirebaseUI-Web 登录我的网站。我有密码登录、Oauth2 Google、OAuth2 Microsoft 和 SSO 选项。

对于除 SSO 之外的所有功能,Identity Platform 都会返回 a,displayName因此我有登录用户的名称。对于 SSO,我没有,而且我也想在那里获取它。

我的客户在其端使用 Azure AD 进行 SSO。他们添加了displayName这样的声明:

在此输入图像描述

但我仍然没有站在displayName我这边。

在使用 FirebaseUI-Web 进行 SSO 登录过程结束时,我收到用户的 ID 令牌。我使用它从 Identity Platform 检索用户,这是我收到的信息:

{
    'localId': 'xxx', 
    'email': 'user@example.com', 
    'emailVerified': True, 
    'providerUserInfo': [{
        'providerId': 'saml.xxx', 
        'federatedId': 'user@example.com', 
        'email': 'user@example.com', 
        'rawId': 'user@example.com'}], 
    'validSince': '1639441441', 
    'lastLoginAt': '1639441441196', 
    'createdAt': '1639441441196', 
    'lastRefreshAt': '2021-12-14T00:24:01.196Z'
}
Run Code Online (Sandbox Code Playgroud)

我们如何配置 Azure 以通过 SSO/SAML 登录向 Google Identity Platform 提供用户名?