apereo/cas · warning
Skipped registration of
Error message
Skipped registration of [{}] since no metadata entity ids could be found What it means
SamlSPUtils.newSamlServiceProviderService registers a SAML SP service in the CAS service registry. It first resolves the SP metadata to determine the entity IDs covered by the metadata; if the resolved entity ID list is empty, the SP cannot be matched by the metadata criteria pattern, so the registration is skipped with this warning and null is returned instead of a service.
Solutions
- Verify the SP metadata location/URL is reachable and returns valid SAML metadata (open it in a browser or curl it).
- If metadata is signed, confirm the signature location (certificate) is correct so OpenSAML can parse the document.
- Check the configured SP definition's entityIds/metadata fields in the support module properties; supply entityIds explicitly if metadata cannot be resolved.
- Inspect earlier log lines for metadata fetch/parse exceptions that preceded this warning.
Example fix
// before SAML_SP_METADATA = "https://sp.example.org/metadata-wrong-path"; // after SAML_SP_METADATA = "https://sp.example.org/saml/metadata"; // reachable, returns valid SP metadata
Defensive patterns
Strategy: validation
Validate before calling
val metadata = fetchAndParseMetadata(sp.getMetadataLocation());
if (metadata == null || metadata.getEntityDescriptors().isEmpty()) {
LOGGER.warn("SP [{}] metadata yields no entity descriptors; fix metadata location first", sp.getName());
return null;
} Prevention
- Curl the metadata URL during deployment checks before starting CAS.
- Keep metadata signature certificates alongside SP definitions and validate them in CI.
- Prefer local metadata copies for critical SPs to avoid network flakiness at startup.
When it happens
Trigger: Calling newSamlServiceProviderService with a SAML SP definition whose metadata source (URL/file/resource) yields no parseable entity IDs: metadata URL unreachable, metadata file missing/empty, metadata signed but signature location wrong so parsing fails, or metadata contains no SPSSODescriptor elements.
Common situations: Typo in the metadata URL in the SP integration properties; firewall/DNS blocking the IdP metadata endpoint at startup; metadata cached from a failed fetch; configuring an SP whose metadata is an IdP-only descriptor.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Unable to determine entity id to fetch metadata via MDQ for
- Configuration element indicated an entityCertificate, but…
- No assertion consumer service could be found for entity
- Endpoint for is not available or does not define a binding…
- Endpoint for does not define a binding or location for…
AI-assisted analysis of apereo/cas@e7288fc434 (2026-09-08).
Data as JSON: /api/errors/48ca5872ad1ee3a5.
Report an issue: GitHub.
Appendix: source
Thrown at support/cas-server-support-saml-sp-integrations/src/main/java/org/apereo/cas/util/SamlSPUtils.java:85
FunctionUtils.doIfNotBlank(sp.getNameIdFormat(), _ -> service.setRequiredNameIdFormat(sp.getNameIdFormat()));
val attributes = CoreAuthenticationUtils.transformPrincipalAttributesListIntoMultiMap(attributesToRelease);
val policy = new ChainingAttributeReleasePolicy();
policy.addPolicies(new ReturnMappedAttributeReleasePolicy().setAllowedAttributes(CollectionUtils.wrap(attributes)));
service.setAttributeReleasePolicy(policy);
service.setMetadataCriteriaRoles(SPSSODescriptor.DEFAULT_ELEMENT_NAME.getLocalPart());
service.setMetadataCriteriaRemoveEmptyEntitiesDescriptors(true);
service.setMetadataCriteriaRemoveRolelessEntityDescriptors(true);
FunctionUtils.doIfNotBlank(sp.getSignatureLocation(), _ -> service.setMetadataSignatureLocation(sp.getSignatureLocation()));
val entityIDList = determineEntityIdList(sp, resolver, service);
if (entityIDList.isEmpty()) {
LOGGER.warn("Skipped registration of [{}] since no metadata entity ids could be found", sp.getName());
return null;
}
val entityIds = org.springframework.util.StringUtils.collectionToDelimitedString(entityIDList, "|");
service.setMetadataCriteriaDirection(PredicateFilter.Direction.INCLUDE.name());
service.setMetadataCriteriaPattern(entityIds);
LOGGER.debug("Registering saml service [{}] by entity id [{}]", sp.getName(), entityIds);
service.setServiceId(entityIds);
service.setSignAssertions(sp.getSignAssertions());
service.setSignResponses(TriStateBoolean.fromBoolean(sp.isSignResponses()));
return service;
}
private static List<String> determineEntityIdList(final AbstractSamlSPProperties sp,
final SamlRegisteredServiceCachingMetadataResolver resolver,
final SamlRegisteredService service) throws Exception {View on GitHub (pinned to e7288fc434)