apereo/cas · warning
Skipped registration of
Error message
Skipped registration of [{}] since no entity id could be found What it means
In SamlSPUtils.determineEntityIdList, the code iterates over parsed metadata entity descriptors looking for one with an SPSSODescriptor. When the Optional descriptor is empty (no SP SS0 descriptor found for the entity), this warning is logged and no entity ID is added for that descriptor, so the SP may later be skipped entirely (see error 630).
Solutions
- Ensure the metadata resource actually describes a SAML 2.0 service provider (contains an SPSSODescriptor with the SAML20P_NS protocol support).
- Do not confuse IdP metadata with SP metadata; use the SP's own metadata URL/file.
- If the SP only supports SAML 1.1, this integration path will not match; upgrade the SP or configure it manually in the service registry.
Example fix
// before metadataLocation = "https://idp.example.org/idp-metadata"; // IdP metadata, no SPSSODescriptor // after metadataLocation = "https://sp.example.org/saml/metadata"; // SP metadata with SPSSODescriptor
Defensive patterns
Strategy: validation
Validate before calling
val isSpMetadata = md.getEntityDescriptors().stream()
.anyMatch(ed -> ed.getSPSSODescriptor(SAMLConstants.SAML20P_NS) != null);
if (!isSpMetadata) throw new IllegalArgumentException("Metadata is not SAML 2.0 SP metadata"); Prevention
- Confirm the descriptor type (SP vs IdP) before wiring a metadata location.
- Use SAML 2.0-capable SPs only for this auto-registration path.
- Validate metadata with a tool like OpenSAML or an online SAML metadata validator.
When it happens
Trigger: Parsing metadata whose EntityDescriptor lacks an SPSSODescriptor (e.g. it only exposes an IDPSSODescriptor), or the SPSSODescriptor is present under a protocol namespace other than SAML20P_NS.
Common situations: Pointing an SP integration at IdP metadata by mistake; SAML 1.x-only metadata without a SAML 2.0 SPSSODescriptor; partially generated or truncated metadata documents.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- SAML metadata resolver
- 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…
- Metadata directory location cannot be located/created
AI-assisted analysis of apereo/cas@e7288fc434 (2026-09-08).
Data as JSON: /api/errors/b9c92980dc83d229.
Report an issue: GitHub.
Appendix: source
Thrown at support/cas-server-support-saml-sp-integrations/src/main/java/org/apereo/cas/util/SamlSPUtils.java:129
val resolvers = new ArrayList<MetadataResolver>();
if (metadataResolver instanceof final ChainingMetadataResolver instance) {
resolvers.addAll(instance.getResolvers());
} else {
resolvers.add(metadataResolver);
}
resolvers.stream()
.filter(AbstractBatchMetadataResolver.class::isInstance)
.map(r -> ((Iterable<EntityDescriptor>) r).iterator())
.map(it -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(it, Spliterator.ORDERED), false)
.filter(e -> e.getSPSSODescriptor(SAMLConstants.SAML20P_NS) != null)
.findFirst())
.forEach(descriptor -> {
if (descriptor.isPresent()) {
entityIDList.add(descriptor.get().getEntityID());
} else {
LOGGER.warn("Skipped registration of [{}] since no entity id could be found", sp.getName());
}
});
}
return entityIDList;
}
/**
* Save service only if it's not already found in the registry.
*
* @param service the service
* @param servicesManager the services manager
*/
public static void saveService(final RegisteredService service, final ServicesManager servicesManager) {
LOGGER.debug("Attempting to save service definition [{}]", service);
servicesManager.load();
if (servicesManager.findServiceBy(registeredService -> registeredService instanceof SamlRegisteredService
&& registeredService.getServiceId().equals(service.getServiceId())).isEmpty()) {View on GitHub (pinned to e7288fc434)