<p dir="ltr"></p>
<p dir="ltr">Hi, </p>
<p dir="ltr">I have a requirement to add the &lt;saml2:Audience&gt; restriction to my IDP&#39;s SAML2SSOProfile configuration. </p>
<p dir="ltr">From <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/IdPSAML2SSOProfileConfig">https://wiki.shibboleth.net/confluence/display/SHIB2/IdPSAML2SSOProfileConfig</a> it looks to me like I should be able to simply add a child element to the Relying Party configuration. </p>
<p dir="ltr">I took my working RelyingParty configuration below:</p>
<p dir="ltr">  &lt;rp:RelyingParty id=&quot;<a href="https://service.providerlogin.com/">https://service.providerlogin.com</a>&quot; provider=&quot;<a href="https://my.idp.com/idp/shibboleth">https://my.idp.com/idp/shibboleth</a>&quot; defaultSigningCredentialRef=&quot;IdPCredential&quot;&gt;</p>
<p dir="ltr">      &lt;rp:ProfileConfiguration xsi:type=&quot;saml:SAML2SSOProfile&quot; encryptAssertions=&quot;never&quot; encryptNameIds=&quot;never&quot;/&gt;</p>
<p dir="ltr">   &lt;/rp:RelyingParty&gt;</p>
<p dir="ltr"> </p>
<p dir="ltr">And added the Audience Child Element similar to below:</p>
<p dir="ltr">   &lt;rp:RelyingParty id=&quot;<a href="https://service.providerlogin.com/">https://service.providerlogin.com</a>&quot; provider=&quot;<a href="https://my.idp.com/idp/shibboleth">https://my.idp.com/idp/shibboleth</a>&quot; defaultSigningCredentialRef=&quot;IdPCredential&quot;&gt;</p>
<p dir="ltr">      &lt;rp:ProfileConfiguration xsi:type=&quot;saml:SAML2SSOProfile&quot; encryptAssertions=&quot;never&quot; encryptNameIds=&quot;never&quot;&gt;</p>
<p dir="ltr">              &lt;rp:Audience&gt;<a href="https://saml2.providerlogin.com/">https://saml2.providerlogin.com</a>&lt;/rp:Audience&gt;</p>
<p dir="ltr">      &lt;/rp:ProfileConfiguration&gt;</p>
<p dir="ltr">    &lt;/rp:RelyingParty&gt;</p>
<p dir="ltr">What I end up with is a SAXParseException error on the relying-party.xml file that is confusing because it states that the element is incorrect, and then lists it as potentially acceptable elements.</p>
<p dir="ltr">I can&#39;t seem to find any good examples using the Audience child element.  Any help appreciated. I&#39;m expecting it&#39;s some simple attribute or namespace error not obvious to me.</p>
<p dir="ltr">cheers,<br>
Ian </p>