次の方法で共有


SAML トークン要求リファレンス

Microsoft ID プラットフォームは、各認証フローの処理で、いくつかの種類のセキュリティ トークンを出力します。 このドキュメントでは、SAML 2.0 トークンの形式、セキュリティ特性、および内容について説明します。

SAML トークン内の要求

名前 同等の JWT 要求 説明
聴衆 aud トークンの目的の受信者。 トークンを受け取るアプリケーションは、対象ユーザーの値が正しいことを確認し、別の対象ユーザー向けのトークンを拒否する必要があります。 <AudienceRestriction>
<Audience>
https://contoso.com
</Audience>
</AudienceRestriction>
認証インスタント 認証が行われた日時を記録します。 <AuthnStatement AuthnInstant="2011-12-29T05:35:22.000Z">
認証方法 amr トークンのサブジェクトが認証された方法を識別します。 <AuthnContextClassRef>
http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod/password
</AuthnContextClassRef>
名前 given_name Microsoft Entra ユーザー オブジェクトに設定されている、ユーザーの最初または "指定された" 名前を提供します。 <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">
<AttributeValue>Frank<AttributeValue>
グループ groups サブジェクトのグループ メンバーシップを表すオブジェクト ID を提供します。 これらの値は一意であり (オブジェクト ID を参照)、リソースへのアクセス許可の適用など、アクセスの管理に安全に使用できます。 グループ要求に含まれるグループは、アプリケーション マニフェストの "groupMembershipClaims" プロパティを使用して、アプリケーションごとに構成されます。 値が null の場合、すべてのグループが除外され、値 "SecurityGroup" にはディレクトリ ロールと Active Directory セキュリティ グループ メンバーシップが含まれます。値 "All" には、セキュリティ グループと Microsoft 365 配布リストの両方が含まれます。

:
ユーザーが参加しているグループの数が制限を超えた場合 (SAML の場合は 150、JWT の場合は 200)、超過分の要求は、ユーザーのグループの一覧を含む Graph エンドポイントを指す要求ソースを追加します。
<Attribute Name="http://schemas.microsoft.com/ws/2008/06/identity/claims/groups">
<AttributeValueaaaaaaaa-0000-1111-2222-bbbbbbbbbbbb</AttributeValue>
グループ超過インジケーター groups:src1 長さ制限はありませんが、トークンに対して大きすぎるトークン要求の場合は、ユーザーの完全なグループ リストへのリンクが含まれます。 SAML の場合、これは groups 要求の代わりに新しい要求として追加されます。

:
Azure AD Graph API は、Microsoft Graph API に置き換えられます。 同等のエンドポイントの詳細については、 user: getMemberObjects を参照してください。
<Attribute Name=" http://schemas.microsoft.com/claims/groups.link">
<AttributeValue>https://graph.windows.net/{tenantID}/users/{userID}/getMemberObjects<AttributeValue>
ID プロバイダー idp トークンのサブジェクトを認証した ID プロバイダーを記録します。 ユーザー アカウントが発行者とは異なるテナントにある場合を除き、この値は発行者要求の値と同じです。 <Attribute Name=" http://schemas.microsoft.com/identity/claims/identityprovider">
<AttributeValue>https://sts.windows.net/aaaabbbb-0000-cccc-1111-dddd2222eeee/<AttributeValue>
IssuedAt iat トークンが発行された時刻を格納します。 トークンの鮮度を測定するためによく使用されます。 <Assertion ID="_d5ec7a9b-8d8f-4b44-8c94-9812612142be" IssueInstant="2014-01-06T20:20:23.085Z" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
発行者 iss トークンを構築して返すセキュリティ トークン サービス (STS) を識別します。 Microsoft Entra ID が返すトークンでは、発行者は sts.windows.net。 発行者要求値の GUID は、Microsoft Entra ディレクトリのテナント ID です。 テナント ID は、ディレクトリの不変で信頼性の高い識別子です。 <Issuer>https://sts.windows.net/aaaabbbb-0000-cccc-1111-dddd2222eeee/</Issuer>
family_name Microsoft Entra ユーザー オブジェクトで定義されているユーザーの姓、姓、またはファミリ名を提供します。 <Attribute Name=" http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">
<AttributeValue>Miller<AttributeValue>
名前 unique_name トークンのサブジェクトを識別する、人が判読できる値を提供します。 この値はテナント内で一意であるとは限らず、表示目的でのみ使用するように設計されています。 <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">
<AttributeValue>frankm@contoso.com<AttributeValue>
オブジェクト ID oid Microsoft Entra ID のオブジェクトの一意識別子を格納します。 この値は変更不可で、再割り当ても再利用もできません。 オブジェクト ID を使用して、Microsoft Entra ID に対するクエリ内のオブジェクトを識別します。 <Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier">
<AttributeValue>bbbbbbbb-1111-2222-3333-cccccccccccc<AttributeValue>
役割 roles グループ メンバーシップを通じて直接および間接的にサブジェクトに付与されたすべてのアプリケーション ロールを表し、ロールベースのアクセス制御を適用するために使用できます。 アプリケーション ロールは、アプリケーション マニフェストの appRoles プロパティを使用して、アプリケーションごとに定義されます。 各アプリケーション ロールの value プロパティは、ロール要求に表示される値です。 <Attribute Name="http://schemas.microsoft.com/ws/2008/06/identity/claims/role">
サブジェクト sub トークンが情報をアサートするプリンシパル (アプリケーションのユーザーなど) を識別します。 サブジェクトは、Microsoft Entra ID が発行する SAML トークンに常に存在します。 NameID 形式によっては、この値を使用して汎用承認システムのサブジェクトを識別できます (承認に電子メール アドレスを使用する場合のリスクを参照してください)。
SubjectConfirmation は要求ではありません。 トークンのサブジェクトの検証方法について説明します。 Bearer は、トークンの所有によってサブジェクトが確認されることを示します。
<Subject>
<NameID>S40rgb3XjhFTv6EQTETkEzcgVmToHKRkZUIsJlmLdVc</NameID>
<SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer" />
</Subject>
テナント ID tid トークンを発行したディレクトリ テナントを識別する、不変で再利用可能でない識別子。 この値を使用して、マルチテナント アプリケーションのテナント固有のディレクトリ リソースにアクセスできます。 たとえば、この値を使用して、Graph API の呼び出しでテナントを識別できます。 <Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid">
<AttributeValue>aaaabbbb-0000-cccc-1111-dddd2222eeee<AttributeValue>
トークンの有効期間 nbfexp トークンが有効な時間間隔を定義します。 トークンを検証するサービスでは、現在の日付がトークンの有効期間内にあることを確認する必要があります。それ以外の場合は、トークンを拒否する必要があります。 このサービスでは、Microsoft Entra ID とサービスの間のクロック時間 ("時間スキュー") の違いを考慮するために、トークンの有効期間の範囲を超えて最大 5 分間許可される場合があります。 <Conditions
NotBefore="2013-03-18T21:32:51.261Z"
NotOnOrAfter="2013-03-18T22:32:51.261Z"
>

SAML トークンのサンプル

これは、一般的な SAML トークンのサンプルです。

<?xml version="1.0" encoding="UTF-8"?>
<t:RequestSecurityTokenResponse xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">
    <t:Lifetime>
        <wsu:Created xmlns:wsu="https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2014-12-24T05:15:47.060Z</wsu:Created>
        <wsu:Expires xmlns:wsu="https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2014-12-24T06:15:47.060Z</wsu:Expires>
    </t:Lifetime>
    <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
        <EndpointReference xmlns="https://www.w3.org/2005/08/addressing">
            <Address>https://contoso.onmicrosoft.com/MyWebApp</Address>
        </EndpointReference>
    </wsp:AppliesTo>
    <t:RequestedSecurityToken>
        <Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="_aaaaaaaa-0b0b-1c1c-2d2d-333333333333" IssueInstant="2014-12-24T05:20:47.060Z" Version="2.0">
            <Issuer>https://sts.windows.net/aaaabbbb-0000-cccc-1111-dddd2222eeee/</Issuer>
            <ds:Signature xmlns:ds="https://www.w3.org/2000/09/xmldsig#">
                <ds:SignedInfo>
                    <ds:CanonicalizationMethod Algorithm="https://www.w3.org/2001/10/xml-exc-c14n#" />
                    <ds:SignatureMethod Algorithm="https://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
                    <ds:Reference URI="#_aaaaaaaa-0b0b-1c1c-2d2d-333333333333">
                        <ds:Transforms>
                            <ds:Transform Algorithm="https://www.w3.org/2000/09/xmldsig#enveloped-signature" />
                            <ds:Transform Algorithm="https://www.w3.org/2001/10/xml-exc-c14n#" />
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="https://www.w3.org/2001/04/xmlenc#sha256" />
                        <ds:DigestValue>E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y/nDY=</ds:DigestValue>
                    </ds:Reference>
                </ds:SignedInfo>
                <ds:SignatureValue>aB1cD2eF3gH4i...J5kL6-mN7oP8qR==</ds:SignatureValue>
                <KeyInfo xmlns="https://www.w3.org/2000/09/xmldsig#">
                    <X509Data>
                        <X509Certificate>C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w</X509Certificate>
                    </X509Data>
                </KeyInfo>
            </ds:Signature>
            <Subject>
                <NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">m_H3naDei2LNxUmEcWd0BZlNi_jVET1pMLR6iQSuYmo</NameID>
                <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer" />
            </Subject>
            <Conditions NotBefore="2014-12-24T05:15:47.060Z" NotOnOrAfter="2014-12-24T06:15:47.060Z">
                <AudienceRestriction>
                    <Audience>https://contoso.onmicrosoft.com/MyWebApp</Audience>
                </AudienceRestriction>
            </Conditions>
            <AttributeStatement>
                <Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier">
                    <AttributeValue>aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb</AttributeValue>
                </Attribute>
                <Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid">
                    <AttributeValue>aaaabbbb-0000-cccc-1111-dddd2222eeee</AttributeValue>
                </Attribute>
                <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">
                    <AttributeValue>sample.admin@contoso.onmicrosoft.com</AttributeValue>
                </Attribute>
                <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">
                    <AttributeValue>Admin</AttributeValue>
                </Attribute>
                <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">
                    <AttributeValue>Sample</AttributeValue>
                </Attribute>
                <Attribute Name="http://schemas.microsoft.com/ws/2008/06/identity/claims/groups">
                    <AttributeValue>5581e43f-6096-41d4-8ffa-04e560bab39d</AttributeValue>
                    <AttributeValue>07dd8a89-bf6d-4e81-8844-230b77145381</AttributeValue>
                    <AttributeValue>0e129f4g-6b0a-4944-982d-f776000632af</AttributeValue>
                    <AttributeValue>3ee07328-52ef-4739-a89b-109708c22fb5</AttributeValue>
                    <AttributeValue>329k14b3-1851-4b94-947f-9a4dacb595f4</AttributeValue>
                    <AttributeValue>6e32c650-9b0a-4491-b429-6c60d2ca9a42</AttributeValue>
                    <AttributeValue>f3a169a7-9a58-4e8f-9d47-b70029v07424</AttributeValue>
                    <AttributeValue>8e2c86b2-b1ad-476d-9574-544d155aa6ff</AttributeValue>
                    <AttributeValue>1bf80264-ff24-4866-b22c-6212e5b9a847</AttributeValue>
                    <AttributeValue>4075f9c3-072d-4c32-b542-03e6bc678f3e</AttributeValue>
                    <AttributeValue>76f80527-f2cd-46f4-8c52-8jvd8bc749b1</AttributeValue>
                    <AttributeValue>0ba31460-44d0-42b5-b90c-47b3fcc48e35</AttributeValue>
                    <AttributeValue>edd41703-8652-4948-94a7-2d917bba7667</AttributeValue>
                </Attribute>
                <Attribute Name="http://schemas.microsoft.com/identity/claims/identityprovider">
                    <AttributeValue>https://sts.windows.net/aaaabbbb-0000-cccc-1111-dddd2222eeee/</AttributeValue>
                </Attribute>
            </AttributeStatement>
            <AuthnStatement AuthnInstant="2014-12-23T18:51:11.000Z">
                <AuthnContext>
                    <AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</AuthnContextClassRef>
                </AuthnContext>
            </AuthnStatement>
        </Assertion>
    </t:RequestedSecurityToken>
    <t:RequestedAttachedReference>
        <SecurityTokenReference xmlns="https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:d3p1="https://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" d3p1:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0">
            <KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID">_aaaaaaaa-0b0b-1c1c-2d2d-333333333333</KeyIdentifier>
        </SecurityTokenReference>
    </t:RequestedAttachedReference>
    <t:RequestedUnattachedReference>
        <SecurityTokenReference xmlns="https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:d3p1="https://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" d3p1:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0">
            <KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID">_aaaaaaaa-0b0b-1c1c-2d2d-333333333333</KeyIdentifier>
        </SecurityTokenReference>
    </t:RequestedUnattachedReference>
    <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
    <t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>
    <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType>
</t:RequestSecurityTokenResponse>

次のステップ