宣告對應原則類型
原則物件代表在個別應用程式或組織中所有應用程式上強制執行的一組規則。 每種原則類型都有唯一的結構,並具有一組屬性,然後套用至指派物件。
宣告對應原則是一種原則物件類型,可修改權杖中包含的宣告。 如需詳細資訊,請參閱 自訂企業應用程式 SAML 權杖中發出的宣告。
宣告集
下表列出定義權杖中使用方式和時機的宣告集。
宣告集 | 描述 |
---|---|
核心宣告集 | 不論原則為何,都會出現在每個權杖中。 這些宣告也會被視為受限制,且無法修改。 |
基本宣告集 | 除了核心宣告集之外,也包含權杖預設包含的宣告。 您可以使用宣告對應原則來省略或修改基本宣告。 |
限制宣告集 | 無法使用原則進行修改。 資料來源無法變更,且在產生這些宣告時不會套用任何轉換。 |
JSON Web 權杖 (JWT) 受限制的宣告集
下列宣告位於 JWT 的限制宣告集中。
.
_claim_names
_claim_sources
aai
access_token
account_type
acct
acr
acrs
actor
actortoken
ageGroup
aio
altsecid
amr
app_chain
app_displayname
app_res
appctx
appctxsender
appid
appidacr
assertion
at_hash
aud
auth_data
auth_time
authorization_code
azp
azpacr
bk_claim
bk_enclave
bk_pub
brk_client_id
brk_redirect_uri
c_hash
ca_enf
ca_policy_result
capolids
capolids_latebind
cc
cert_token_use
child_client_id
child_redirect_uri
client_id
client_ip
cloud_graph_host_name
cloud_instance_host_name
cloud_instance_name
CloudAssignedMdmId
cnf
code
controls
controls_auds
credential_keys
csr
csr_type
ctry
deviceid
dns_names
domain_dns_name
domain_netbios_name
e_exp
email
endpoint
enfpolids
exp
expires_on
extn. as prefix
fido_auth_data
fido_ver
fwd
fwd_appidacr
grant_type
graph
group_sids
groups
hasgroups
hash_alg
haswids
home_oid
home_puid
home_tid
iat
identityprovider
idp
idtyp
in_corp
instance
inviteTicket
ipaddr
isbrowserhostedapp
iss
isViral
jwk
key_id
key_type
login_hint
mam_compliance_url
mam_enrollment_url
mam_terms_of_use_url
mdm_compliance_url
mdm_enrollment_url
mdm_terms_of_use_url
msgraph_host
msproxy
nameid
nbf
netbios_name
nickname
nonce
oid
on_prem_id
onprem_sam_account_name
onprem_sid
openid2_id
origin_header
password
platf
polids
pop_jwk
preferred_username
previous_refresh_token
primary_sid
prov_data
puid
pwd_exp
pwd_url
rdp_bt
redirect_uri
refresh_token
refresh_token_issued_on
refreshtoken
request_nonce
resource
rh
role
roles
rp_id
rt_type
scope
scp
secaud
sid
sid
signature
signin_state
source_anchor
src1
src2
sub
target_deviceid
tbid
tbidv2
tenant_ctry
tenant_display_name
tenant_id
tenant_region_scope
tenant_region_sub_scope
thumbnail_photo
tid
tokenAutologonEnabled
trustedfordelegation
ttr
unique_name
upn
user_agent
user_setting_sync_url
username
uti
ver
verified_primary_email
verified_secondary_email
vnet
vsm_binding_key
wamcompat_client_info
wamcompat_id_token
wamcompat_scopes
wids
win_ver
x5c_ca
xcb2b_rclient
xcb2b_rcloud
xcb2b_rtenant
ztdid
注意
開頭 xms_
的任何宣告都受到限制。
SAML 限制宣告集
下表列出限制宣告集中的 SAML 宣告。
限制宣告類型 (URI):
http://schemas.microsoft.com/2012/01/devicecontext/claims/ismanaged
http://schemas.microsoft.com/2014/02/devicecontext/claims/isknown
http://schemas.microsoft.com/2014/03/psso
http://schemas.microsoft.com/2014/09/devicecontext/claims/iscompliant
http://schemas.microsoft.com/claims/authnmethodsreferences
http://schemas.microsoft.com/claims/groups.link
http://schemas.microsoft.com/identity/claims/accesstoken
http://schemas.microsoft.com/identity/claims/acct
http://schemas.microsoft.com/identity/claims/agegroup
http://schemas.microsoft.com/identity/claims/aio
http://schemas.microsoft.com/identity/claims/identityprovider
http://schemas.microsoft.com/identity/claims/objectidentifier
http://schemas.microsoft.com/identity/claims/openid2_id
http://schemas.microsoft.com/identity/claims/puid
http://schemas.microsoft.com/identity/claims/scope
http://schemas.microsoft.com/identity/claims/tenantid
http://schemas.microsoft.com/identity/claims/xms_et
http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant
http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod
http://schemas.microsoft.com/ws/2008/06/identity/claims/confirmationkey
http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarygroupsid
http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarysid
http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlywindowsdevicegroup
http://schemas.microsoft.com/ws/2008/06/identity/claims/expiration
http://schemas.microsoft.com/ws/2008/06/identity/claims/expired
http://schemas.microsoft.com/ws/2008/06/identity/claims/groups
http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid
http://schemas.microsoft.com/ws/2008/06/identity/claims/ispersistent
http://schemas.microsoft.com/ws/2008/06/identity/claims/role
http://schemas.microsoft.com/ws/2008/06/identity/claims/role
http://schemas.microsoft.com/ws/2008/06/identity/claims/samlissuername
http://schemas.microsoft.com/ws/2008/06/identity/claims/wids
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsdeviceclaim
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsdevicegroup
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsfqbnversion
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowssubauthority
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsuserclaim
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authentication
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authorizationdecision
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/denyonlysid
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn
http://schemas.xmlsoap.org/ws/2009/09/identity/claims/actor
這些宣告預設會受到限制,但如果您有 自訂簽署金鑰 ,則不會受到限制。 避免在應用程式資訊清單中設定 acceptMappedClaims
。
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname
http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid
http://schemas.microsoft.com/ws/2008/06/identity/claims/primarygroupsid
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname
這些宣告預設會受到限制,但如果您有 自訂簽署金鑰 ,則不會受到限制:
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn
http://schemas.microsoft.com/ws/2008/06/identity/claims/role
宣告對應原則屬性
若要控制包含的宣告,以及資料的來源,請使用宣告對應原則的屬性。 如果沒有原則,系統就會發出具有下列宣告的權杖:
- 核心宣告集。
- 基本宣告集。
- 應用程式選擇接收的任何 選擇性宣告 。
注意
核心宣告集中的宣告存在於每個權杖中,不論此屬性設定為什麼。
String | 資料類型 | 摘要 |
---|---|---|
IncludeBasicClaimSet | 布林值 (True 或 False) | 判斷基本宣告集是否包含在受此原則影響的權杖中。 如果設定為 True,則基本宣告集中的所有宣告都會在受原則影響的權杖中發出。 如果設定為 False,則基本宣告集中的宣告不在權杖中,除非這些宣告是在相同原則的宣告架構屬性中個別新增。 |
ClaimsSchema | 具有一或多個宣告架構專案的 JSON Blob | 除了基本宣告集和核心宣告集之外,定義受原則影響之權杖中的宣告。 針對此屬性中定義的每個宣告架構專案,需要特定資訊。 指定資料來自何處(Value、Source/ID pair 或 Source/ExtensionID pair ),以及 發出為 ( JWTClaimType 或 SamlClaimType ) 的宣告類型。 |
宣告架構專案專案
- Value - 將靜態值定義為宣告中要發出的資料。
- SAMLNameForm - 定義此宣告之 NameFormat 屬性的值。 如果存在,允許的值為:
urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
urn:oasis:names:tc:SAML:2.0:attrname-format:uri
urn:oasis:names:tc:SAML:2.0:attrname-format:basic
- 來源/識別碼組 - 定義宣告中的資料來源位置。
- Source/ExtensionID 配對 - 定義宣告中資料的來原始目錄延伸模組屬性。 如需詳細資訊,請參閱 在宣告 中使用目錄擴充屬性。
- 宣告類型 - JwtClaimType 和 SamlClaimType 元素會定義此宣告架構專案所參考的宣告。
- JwtClaimType 必須包含 JWT 中要發出的宣告名稱。
- SamlClaimType 必須包含 SAML 權杖中要發出之宣告的 URI。
將 Source 元素設定為下表中的其中一個值。
來源值 | 宣告中的資料 |
---|---|
user |
User 物件上的 屬性。 |
application |
應用程式 (用戶端) 服務主體上的 屬性。 |
resource |
資源服務主體上的 屬性。 |
audience |
服務主體上的 屬性,這是權杖的物件(用戶端或資源服務主體)。 |
company |
資源租使用者的 Company 物件上的 屬性。 |
transformation |
宣告轉換。 當您使用此宣告時, TransformationID 元素必須包含在宣告定義中。 TransformationID 元素必須符合 ClaimsTransformation 屬性中 轉換專案的 ID 元素,以定義如何產生宣告的資料。 |
ID 元素會識別來源上的 屬性,該屬性會提供宣告的值。 下表列出 Source 每個值的 ID 元素值。
來源 | 識別碼 | 描述 |
---|---|---|
user |
surname |
使用者的系列名稱。 |
user |
givenname |
使用者的名字。 |
user |
displayname |
使用者的顯示名稱。 |
user |
objectid |
使用者的物件識別碼。 |
user |
mail |
使用者的電子郵件地址。 |
user |
userprincipalname |
使用者的使用者主體名稱。 |
user |
department |
使用者的部門。 |
user |
onpremisessamaccountname |
使用者的內部部署 SAM 帳戶名稱。 |
user |
netbiosname |
使用者的 NetBios 名稱。 |
user |
dnsdomainname |
使用者的 DNS 功能變數名稱。 |
user |
onpremisesecurityidentifier |
使用者的內部部署安全性識別碼。 |
user |
companyname |
使用者的組織名稱。 |
user |
streetaddress |
使用者的街道位址。 |
user |
postalcode |
使用者的郵遞區號。 |
user |
preferredlanguage |
使用者慣用的語言。 |
user |
onpremisesuserprincipalname |
使用者的內部部署 UPN。 當您使用替代識別碼時,內部部署屬性 userPrincipalName 會與 onPremisesUserPrincipalName 屬性同步處理。 只有在設定替代識別碼時,才能使用這個屬性。 |
user |
mailnickname |
使用者的郵件昵稱。 |
user |
extensionattribute1 |
擴充屬性 1。 |
user |
extensionattribute2 |
擴充屬性 2。 |
user |
extensionattribute3 |
擴充屬性 3。 |
user |
extensionattribute4 |
擴充屬性 4。 |
user |
extensionattribute5 |
擴充屬性 5。 |
user |
extensionattribute6 |
擴充屬性 6。 |
user |
extensionattribute7 |
擴充屬性 7。 |
user |
extensionattribute8 |
擴充屬性 8。 |
user |
extensionattribute9 |
擴充屬性 9。 |
user |
extensionattribute10 |
擴充屬性 10。 |
user |
extensionattribute11 |
擴充屬性 11。 |
user |
extensionattribute12 |
擴充屬性 12。 |
user |
extensionattribute13 |
擴充屬性 13。 |
user |
extensionattribute14 |
擴充屬性 14。 |
user |
extensionattribute15 |
擴充屬性 15。 |
user |
othermail |
使用者的其他郵件。 |
user |
country |
使用者的國家/地區。 |
user |
city |
使用者的城市。 |
user |
state |
使用者的縣/市。 |
user |
jobtitle |
使用者的職稱。 |
user |
employeeid |
使用者的員工識別碼。 |
user |
facsimiletelephonenumber |
使用者的 facsimile 電話號碼。 |
user |
assignedroles |
指派給使用者的應用程式角色清單。 |
user |
accountEnabled |
指出是否啟用使用者帳戶。 |
user |
consentprovidedforminor |
指出是否為未成年人提供同意。 |
user |
createddatetime |
使用者帳戶建立的日期和時間。 |
user |
creationtype |
指出使用者帳戶的建立方式。 |
user |
lastpasswordchangedatetime |
密碼變更的最後日期和時間。 |
user |
mobilephone |
使用者的行動電話。 |
user |
officelocation |
使用者的辦公室位置。 |
user |
onpremisesdomainname |
使用者的內部部署功能變數名稱。 |
user |
onpremisesimmutableid |
使用者的內部部署不彈性識別碼。 |
user |
onpremisessyncenabled |
指出是否啟用內部部署同步處理。 |
user |
preferreddatalocation |
定義使用者慣用的資料位置。 |
user |
proxyaddresses |
使用者的 Proxy 位址。 |
user |
usertype |
使用者帳戶的類型。 |
user |
telephonenumber |
使用者的商務或辦公室電話。 |
application , resource , audience |
displayname |
物件的顯示名稱。 |
application , resource , audience |
objectid |
物件的識別碼。 |
application , resource , audience |
tags |
物件的服務主體標記。 |
company |
tenantcountry |
租使用者的國家/地區。 |
使用者物件上唯一可用的多重值宣告來源是已從 Active Directory 同步處理的多重值擴充屬性連線。 其他屬性,例如 othermails
和 tags
,都是多重值,但在選取為來源時,只會發出一個值。
限制宣告集中宣告的名稱和 URI 無法用於宣告類型專案。
群組篩選
- 字串 - GroupFilter
- 資料類型: - JSON Blob
- 摘要 - 使用此屬性對要包含在群組宣告中的使用者群組套用篩選。 這個屬性可以是減少權杖大小的實用方法。
- MatchOn: - 識別要套用篩選的群組屬性。 將 MatchOn 屬性設定為下列其中一個值:
displayname
- 群組顯示名稱。samaccountname
- 內部部署 SAM 帳戶名稱。
- 類型 - 定義套用至 MatchOn 屬性所 選取屬性的篩選準則類型。 將 Type 屬性設定為下列其中一個值:
prefix
- 包含 MatchOn 屬性開頭為所提供 Value 屬性的群組 。suffix
包含 MatchOn 屬性結尾為所提供 Value 屬性的群組 。contains
- 包含 MatchOn 屬性包含與所提供 Value 屬性的群組 。
宣告轉換
- 字串 - ClaimsTransformation
- 資料類型 - 具有一或多個轉換專案的 JSON Blob
- 摘要 - 使用此屬性將一般轉換套用至來源資料,以產生宣告架構中所指定宣告的輸出資料。
- 識別碼 - 參考 TransformationID 宣告架構專案中的轉換專案。 對於此原則中的每個轉換專案,這個值必須是唯一的。
- TransformationMethod - 識別執行以產生宣告資料的作業。
根據所選擇的方法,預期會有一組輸入和輸出。 使用 InputClaims 、 InputParameters 和 OutputClaims 元素來定義輸入和輸出。
TransformationMethod | 預期的輸入 | 預期的輸出 | 描述 |
---|---|---|---|
聯結 | string1, string2, separator | 輸出宣告 | 在 之間使用分隔符號聯結輸入字串。 例如,string1:、string2: foo@bar.com sandbox 、分隔符號: . 會產生輸出宣告: foo@bar.com.sandbox 。 |
ExtractMailPrefix | 電子郵件或 UPN | 擷取的字串 | 擴充屬性 1-15 或任何其他目錄延伸模組,其會儲存使用者的 UPN 或電子郵件地址值。 例如: johndoe@contoso.com 。 擷取電子郵件地址的本機部分。 例如,郵件: foo@bar.com 會產生輸出宣告: foo 。 如果沒有 @ 符號,則會傳回原始輸入字串。 |
ToLowercase() | string | 輸出字串 | 將選取屬性的字元轉換成小寫字元。 |
ToUppercase() | string | 輸出字串 | 將選取屬性的字元轉換成大寫字元。 |
RegexReplace() | RegexReplace() 轉換接受做為輸入參數: - 參數 1:使用者屬性作為 RegEx 輸入 - 信任來源為多重值的選項 - Regex 模式 - 取代模式。 取代模式可能包含靜態文字格式,以及指向 RegEx 輸出群組和更多輸入參數的參考。 |
- InputClaims - 用來將資料從宣告架構專案傳遞至轉換。 它有三個屬性:ClaimTypeReferenceId 、 TransformationClaimType 和 TreatAsMultiValue 。
- ClaimTypeReferenceId - 與宣告架構專案的 ID 元素聯結,以尋找適當的輸入宣告。
- TransformationClaimType 提供此輸入的唯一名稱。 此名稱必須符合轉換方法的其中一個預期輸入。
- TreatAsMultiValue 是布林值旗標,指出轉換應套用至所有值,還是只套用第一個值。 根據預設,轉換只會套用至多重值宣告中的第一個專案。 將此值設定為 true 可確保其全部套用。 ProxyAddresses 和 groups 是輸入宣告的兩個範例,您可能想要視為多重值宣告。
- InputParameters - 將常數值傳遞至轉換。 它有兩個屬性: 值 和 識別碼 。
- Value 是要傳遞的實際常數值。
- 識別碼 是用來為輸入提供唯一的名稱。 名稱必須符合轉換方法的其中一個預期輸入。
- OutputClaims - 保存轉換所產生的資料,並將它系結至宣告架構專案。 它有兩個屬性: ClaimTypeReferenceId 和 TransformationClaimType 。
- ClaimTypeReferenceId 會聯結宣告架構專案的識別碼,以尋找適當的輸出宣告。
- TransformationClaimType 可用來為輸出提供唯一的名稱。 名稱必須符合轉換方法的其中一個預期輸出。
例外狀況和限制
SAML NameID 和 UPN - 來源 NameID 和 UPN 值的屬性,以及允許的宣告轉換會受到限制。
來源 | 識別碼 | 描述 |
---|---|---|
user |
mail |
使用者的電子郵件地址。 |
user |
userprincipalname |
使用者的使用者主體名稱。 |
user |
onpremisessamaccountname |
內部部署 Sam 帳戶名稱 |
user |
employeeid |
使用者的員工識別碼。 |
user |
telephonenumber |
使用者的商務或辦公室電話。 |
user |
extensionattribute1 |
擴充屬性 1。 |
user |
extensionattribute2 |
擴充屬性 2。 |
user |
extensionattribute3 |
擴充屬性 3。 |
user |
extensionattribute4 |
擴充屬性 4。 |
user |
extensionattribute5 |
擴充屬性 5。 |
user |
extensionattribute6 |
擴充屬性 6。 |
user |
extensionattribute7 |
擴充屬性 7。 |
user |
extensionattribute8 |
擴充屬性 8。 |
user |
extensionattribute9 |
擴充屬性 9。 |
user |
extensionattribute10 |
擴充屬性 10。 |
user |
extensionattribute11 |
擴充屬性 11。 |
user |
extensionattribute12 |
擴充屬性 12。 |
user |
extensionattribute13 |
擴充屬性 13。 |
user |
extensionattribute14 |
擴充屬性 14。 |
User |
extensionattribute15 |
擴充屬性 15。 |
下表所列的轉換方法允許 SAML NameID 使用。
TransformationMethod | 限制 |
---|---|
ExtractMailPrefix | 無 |
聯結 | 要加入的尾碼必須是資源租使用者的已驗證網域。 |
具有應用程式識別碼的簽發者
- 字串 - issuerWithApplicationId
- 資料類型 - 布林值 (True 或 False)
- 如果設定為
True
,應用程式識別碼就會新增至受原則影響之權杖中的簽發者宣告。 - 如果設定為
False
,則應用程式識別碼不會新增至受原則影響之權杖中的簽發者宣告。 (預設值)
- 如果設定為
- 摘要 - 可讓應用程式識別碼包含在簽發者宣告中。 確保相同應用程式的多個實例針對每個實例都有唯一的宣告值。 如果未為應用程式設定自訂簽署金鑰,則會忽略此設定。
物件覆寫
- 字串 - audienceOverride
- 資料類型 - 字串
- 摘要 - 可讓您覆寫傳送至應用程式的物件宣告。 提供的值必須是有效的絕對 URI。 如果未為應用程式設定任何自訂簽署金鑰,則會忽略此設定。
下一步
- 若要深入瞭解擴充屬性,請參閱 宣告 中的目錄擴充屬性。