Configure the AD FS server for claims-based authentication -zhai zi wangluo
Applies To: Microsoft Dynamics CRM 2011, Microsoft Dynamics CRM 2013
After enabling claims-based authentication, the next step is to add and configure the claims provider and relying party trusts in AD FS.
You need to add a claims rule to retrieve the user principal name (UPN) attribute from Active Directory and send it to Microsoft Dynamics CRM as a UPN.
-
On the server running AD FS, start AD FS Management.
-
In the Navigation Pane, expand Trust Relationships, and then click Claims Provider Trusts.
-
Under Claims Provider Trusts, right-click Active Directory, and then click Edit Claims Rules.
-
In the Rules Editor, click Add Rule.
-
In the Claim rule template list, select the Send LDAP Attributes as Claims template, and then click Next.
-
Create the following rule:
- Claim rule name: UPN Claim Rule (or something descriptive)
- Add the following mapping:
- Attribute store: Active Directory
- LDAP Attribute: User Principal Name
- Outgoing Claim Type: UPN
- Attribute store: Active Directory
- Claim rule name: UPN Claim Rule (or something descriptive)
-
Click Finish, and then click OK to close the Rules Editor.
After you enable claims-based authentication, you must configure Microsoft Dynamics CRM Server as a relying party to consume claims from AD FS for authenticating internal claims access.
-
On the server running AD FS, start AD FS Management.
-
In the Navigation Pane, expand Trust Relationships, and then click Relying Party Trusts.
-
On the Actions menu located in the right column, click Add Relying Party Trust.
-
In the Add Relying Party Trust Wizard, click Start.
-
On the Select Data Source page, click Import data about the relying party published online or on a local network, and then type the URL to locate the federationmetadata.xml file.
This federation metadata is created during claims setup. Use the URL listed on the last page of the Configure Claims-Based Authentication Wizard (before you click Finish), for example, https://internalcrm.contoso.com/FederationMetadata/2007-06/FederationMetadata.xml. Verify that no certificate-related warnings appear.
-
Click Next.
-
On the Specify Display Name page, type a display name, such as CRM Claims Relying Party, and then click Next.
-
On the Configure Multi-factor Authentication Now page, make your selection and click Next.
-
On the Choose Issuance Authorization Rules page, click Permit all users to access this relying party, and then click Next.
-
On the Ready to Add Trust page, on the Identifiers tab, verify that Relying party identifiers has a single identifier such as the following:
- https://internalcrm.contoso.com
If your identifier differs from the above example, click Previous in the Add Relying Party Trust Wizard and check the Federation metadata address.
- https://internalcrm.contoso.com
-
Click Next, and then click Close.
-
If the Rules Editor appears, click Add Rule. Otherwise, in the Relying Party Trusts list, right-click the relying party object that you created, click Edit Claims Rules, and then click Add Rule.
Important
Be sure the Issuance Transform Rules tab is selected. -
In the Claim rule template list, select the Pass Through or Filter an Incoming Claim template, and then click Next.
-
Create the following rule:
- Claim rule name: Pass Through UPN (or something descriptive)
- Add the following mapping:
- Incoming claim type: UPN
- Pass through all claim values
- Incoming claim type: UPN
- Claim rule name: Pass Through UPN (or something descriptive)
-
Click Finish.
-
In the Rules Editor, click Add Rule, in the Claim rule template list, select the Pass Through or Filter an Incoming Claim template, and then click Next.
-
Create the following rule:
- Claim rule name: Pass Through Primary SID (or something descriptive)
- Add the following mapping:
- Incoming claim type: Primary SID
- Pass through all claim values
- Incoming claim type: Primary SID
- Claim rule name: Pass Through Primary SID (or something descriptive)
-
Click Finish.
-
In the Rules Editor, click Add Rule.
-
In the Claim rule template list, select the Transform an Incoming Claim template, and then click Next.
-
Create the following rule:
- Claim rule name: Transform Windows Account Name to Name (or something descriptive)
- Add the following mapping:
- Incoming claiming type: Windows account name
- Outgoing claim type: Name or * Name
- Pass through all claim values
- Incoming claiming type: Windows account name
- Claim rule name: Transform Windows Account Name to Name (or something descriptive)
-
Click Finish, and when you have created all three rules, click OK to close the Rules Editor.
This illustration shows the three relying party trust rules you create.
The relying party trust you created defines how AD FS Federation Service recognizes the Microsoft Dynamics CRM relying party and issues claims to it.
In AD FS in Windows Server 2012 R2, forms authentication is not enabled by default.
-
Log on to the AD FS server as an administrator.
-
Open the AD FS management console and click Authentication Policies.
-
Under Primary Authentication, Global Settings, Authentication Methods, click Edit.
-
Under Intranet, enable (check) Forms Authentication.

See Also
Send comments about this article to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
2009-09-18 dataset的压缩与传输