基於我的研究,似乎無法使用聯合(本地ADFS)ID與Dynamics Web服務集成。我們使用的IDP沒有響應WS-Trust RequestSecurityToken,所以我無法檢索SAML。就算我是,雖然this article表明它不可能檢索動態SAML:
的問題是,訪問控制服務的XML SOAP消息接受已被簽署,並就如何在細節這是CRM SDK/Identity Model的內部特性。
由於您無法簽署XML消息發送到訪問控制服務,因此與CRM 2011的集成無法工作。
文章繼續指出解決方法是創建一個Microsoft Online ID。就我而言,這是Office 365中的雲用戶。一旦將此用戶添加到我的Dynamics實例中,我就可以使用問題中鏈接到的文檔中描述的方法。
爲了完整起見,下面是https://login.microsoftonline.com/RST2.srf
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>
<a:MessageID>urn:uuid:{GENERATE-GUID-HERE}</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo4TBVw9fIMZFmc7ZFxBXIcYAAAAAbd1LF/fnfUOzaja8sGev0GKsBdINtR5Jt13WPsZ9dPgACQAA</VsDebuggerCausalityData>
<a:To s:mustUnderstand="1">https://login.microsoftonline.com/RST2.srf </a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>{UTC-TIMESTAMP}</u:Created>
<u:Expires>{UTC-TIMESTAMP}</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-14bed392-2320-44ae-859d-fa4ec83df57a-1">
<o:Username>{CLOUD-USERNAME}</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{CLOUD-PASSWORD}</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<t:RequestSecurityToken xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">
<wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<a:EndpointReference>
<a:Address>urn:crmna:dynamics.com</a:Address>
</a:EndpointReference>
</wsp:AppliesTo>
<t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>
</t:RequestSecurityToken>
</s:Body>
</s:Envelope>
更換以下領域所取得的SOAP請求的例子:
響應將包含KeyIdentifier和2個CypherValue元素。使用這些來爲CRM的請求構建SOAP頭。完整的代碼可以在問題中引用的鏈接中找到。
對我的項目很有幫助。謝謝 – Pandaski