Custom URL not generated in SSO metadataIssue When Customer has created 2 or more custom URLs and both are Active: - -> a.b.com (Redirects to Native UI)-> c.b.com (Redirects to a Service Portal) While clicking on "Generate Metadata" on Identity Provider , instance can show only "a.b.com". "c.b.com" is not present in the Metadata XML. <EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://INSTANCE_NAME.service-now.com"><SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://INSTANCE_NAME.service-now.com/navpage.do"/><NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</NameIDFormat><AssertionConsumerService isDefault="true" index="0" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://INSTANCE_NAME.service-now.com/navpage.do" /><AssertionConsumerService isDefault="false" index="1" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://a.b.com/navpage.do" /><AssertionConsumerService isDefault="false" index="2" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://INSTANCE_NAME.service-now.com/example.do" /><AssertionConsumerService isDefault="false" index="3" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://https://a.b.com/example.do" /></SPSSODescriptor></EntityDescriptor> ReleaseAllCauseThe root cause must be the trailing space in the domain record for 'a.b.com' on the instance. You might see similar errors in the logs: 2022-11-02 19:22:46Error CustomURL: could not replace the host of the url : https://INSTANCE_NAME.service-now.com/navpage.do to dev-servicehub.eon.com : java.net.URISyntaxException: Illegal character in authority at index 8: https://a.b.com/navpage.do:java.net.URI$Parser.fail(URI.java:2848)java.net.URI$Parser.parseAuthority(URI.java:3186)java.net.URI$Parser.parseHierarchical(URI.java:3097)java.net.URI$Parser.parse(URI.java:3053)java.net.URI.<init>(URI.java:588)ResolutionOnce that trailing space is removed, re-enter the new domain to be added add see if the issue occurs again. It is required to see the XML version of the custom url page to see the space or strange character: https://INSTANCE_NAME.service-now.com/custom_url.do?XML&sys_id=xxxxxxxx<xml><custom_url><is_cname_valid>true</is_cname_valid><is_instance_url>false</is_instance_url><last_cname_validation_time>2022-09-20 15:06:54</last_cname_validation_time><message/><service_portal>36fac7bbdb91434085f87cbdae961978</service_portal><status>active</status><sys_created_by>A63883</sys_created_by><sys_created_on>2022-09-20 14:36:52</sys_created_on><sys_id>df2d5475db821950d6e53ec3f3961975</sys_id><sys_mod_count>1</sys_mod_count><sys_updated_by>system</sys_updated_by><sys_updated_on>2022-09-20 15:06:54</sys_updated_on><url_domain>a.b.com </url_domain></custom_url></xml> For more information about generate custom url metadata please refer to our documentation page https://docs.servicenow.com/bundle/quebec-platform-administration/page/integrate/single-sign-on/task/generate-idp-metadata-sso.html For other troubleshooting steps, please visit our kb article page KB0716587