# Invalid SAML Metadata

**URL:** <https://community.sonatype.com/t/invalid-saml-metadata/7635>\
**Category:** Sonatype Nexus Repository\
**Tags:** help, nexus-repository\
**Created:** [November 10, 2021, 10:52pm UTC](https://community.sonatype.com/t/invalid-saml-metadata/7635 "2021-11-10T22:52:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robarencibia](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@robarencibia](https://community.sonatype.com/u/robarencibia)\
**Post date:** [November 10, 2021, 10:52pm UTC](https://community.sonatype.com/t/invalid-saml-metadata/7635/1 "2021-11-10T22:52:04Z")

</div>

I am running into this issue with my SAML. Has anyone ran into this issue?

[idpMetadata]  
[Invalid SAML metadata: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘SingleLogoutService’. One of ‘{“urn:oasis:names:tc:SAML:2.0:metadata”:NameIDFormat, “urn:oasis:names:tc:SAML:2.0:metadata”:SingleSignOnService}’ is expected.]  
[org.sonatype.nexus.validation.ConstraintViolationFactory$HelperBean@c5170c3]

---

<div class="post-metadata">

**Author:** ![mmartz](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mmartz](https://community.sonatype.com/u/mmartz)\
**Post date:** [November 12, 2021, 3:17pm UTC](https://community.sonatype.com/t/invalid-saml-metadata/7635/2 "2021-11-12T15:17:50Z")

</div>

This indicates a problem with the saml xml. Which SAML provider are you using?

---

<div class="post-metadata">

**Author:** ![robarencibia](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@robarencibia](https://community.sonatype.com/u/robarencibia)\
**Post date:** [November 15, 2021, 8:55pm UTC](https://community.sonatype.com/t/invalid-saml-metadata/7635/3 "2021-11-15T20:55:04Z")

</div>

We are using GCDS not sure if your familiar with that IdP.

---

<div class="post-metadata">

**Author:** ![mmartz](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mmartz](https://community.sonatype.com/u/mmartz)\
**Post date:** [November 15, 2021, 9:12pm UTC](https://community.sonatype.com/t/invalid-saml-metadata/7635/4 "2021-11-15T21:12:26Z")

</div>

Are you referring to Google Cloud Director Sync? Unfortunately that’s not one of the SAML providers we tested with so I can’t guarantee our SAML implementation will work with it. That said, you may be able to simply remove some of the tags from your xml metadata to get things working. Here is a minimal example I found from some of our azure testing (hashes and certificates replaced for conciseness).

```auto
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="id" entityID="https://sts.windows.net/hash/">
  <IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    <KeyDescriptor use="signing">
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <X509Data>
          <X509Certificate>
            certificate goes here
          </X509Certificate>
        </X509Data>
      </KeyInfo>
    </KeyDescriptor>
    <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://login.microsoftonline.com/hash/saml2"/>
    <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://login.microsoftonline.com/hash/saml2"/>
    <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://login.microsoftonline.com/hash/saml2"/>
  </IDPSSODescriptor>
</EntityDescriptor>

```
