# SamlResponse Signed & Encrypted

**URL:** <https://devforum.okta.com/t/samlresponse-signed-encrypted/4266>\
**Category:** SAML\
**Created:** [February 20, 2019, 11:42am UTC](https://devforum.okta.com/t/samlresponse-signed-encrypted/4266 "2019-02-20T11:42:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngajipara](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@ngajipara](https://devforum.okta.com/u/ngajipara)\
**Post date:** [February 20, 2019, 11:42am UTC](https://devforum.okta.com/t/samlresponse-signed-encrypted/4266/1 "2019-02-20T11:42:51Z")

</div>

Using .NET Library (System.IdentityProvider), Saml2SecurityToken is created after decrypting Saml2Assertion which has a two properties “ExternalEncryptedKey” and “EncryptingCredentials”. It fails while writing / serializing assertion in string and throwing “saml2assertion cannot specify externalencryptedkeys unless encryptingcredentials are also specified”. Any answer on this would really help. are we missing any configuration in idp or sp?

Thanks,  
Nikhil

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 12, 2024, 7:01pm UTC](https://devforum.okta.com/t/samlresponse-signed-encrypted/4266/2 "2024-02-12T19:01:44Z")

</div>

Closed on February 12, 2024, 7:01pm UTC


