Legacy Knowledge Base
公開されました Jul. 2, 2025

SAML with Azure ADでURL形式の属性名を使用すると、認証に失敗し、メール検証エラーが発生する。

Written By

Eric Yan

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • Liferay SAMLとAzure ADの統合が、特に属性マッピングに関して適切に設定されていない可能性があります。 この結果、ユーザーが初めてログインしようとしたときに、Email Validationエラーがログに記録されてしまうという問題がありました。
  • エラーメッセージの例
    2021-03-19 22:23:26.841 ERROR [http-nio-8081-exec-3][WebSsoProfileImpl:219] Email name address must validate with com.liferay.portal.kernel.security.auth.DefaultEmailAddressValidator

環境

  • サービスプロバイダーとしてのLiferay DXP
  • アイデンティティプロバイダーとしてのAzure AD

解決

  • Azure AD を Identity Provider として使用する場合、Attribute Statement の名前には、次のような URL 形式の名前を使用するのが一般的です。
    http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
  • Liferay SAMLのAttribute Mappingでは、以下のような特殊文字が含まれる場合、特別な処理が必要となります。 # ! : =. これらの文字はバックスラッシュでエスケープする必要があります。
  • Azure ADの場合、Attribute Statementの名前の中に : が含まれているのが一般的です。
  • これを解決するには、単純に上述の特殊文字をエスケープします。

    例 - エスケープされた文字を使った属性マッピング。
    http\://schemas.xmlsoap.org/ws/2005/05/identity/claims/name=emailAddress

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base