Processing a SAML 1.1 assertion and sending via httpwebrequest

638 Views Asked by At

I have a project with the need to gather data from Sharepoint Online lists, the solution has to authenticate via ADFS without user interaction.

I followed this example http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx and I am able to receive an assertion from the ADFS, however my returned SAML assertion does not include a BinarySecurityToken, so I must modify the code from this point(?).

Firstly, How do I process (Decrypt?/sign?/validate? I'm not sure what it is I have to do with the assertion before sending) the SAML assertion to prepare it for sending to /login.srf

Secondly, how do I send this via httpwebrequest to receive a httpwebresponse containing cookies?

Thanks in advance for any help, and any code samples, tutorials or information in general is greatly appreciated.

PS - missing binarysecuritytoken is not the result of a migration from BPOS in this instance.

Debura

EDIT 1 I can provide the assertion, if you could advise which xml elements i should remove before posting and I also have a signing certificate from adfs

0

There are 0 best solutions below