{"record":{"id":"b9c92980dc83d229","repo":"apereo/cas","slug":"skipped-registration-of-since-no-entity-id-co","errorCode":null,"errorMessage":"Skipped registration of [{}] since no entity id could be found","messagePattern":"Skipped registration of \\[(.+?)\\] since no entity id could be found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"support/cas-server-support-saml-sp-integrations/src/main/java/org/apereo/cas/util/SamlSPUtils.java","lineNumber":129,"sourceCode":"\n            val resolvers = new ArrayList<MetadataResolver>();\n            if (metadataResolver instanceof final ChainingMetadataResolver instance) {\n                resolvers.addAll(instance.getResolvers());\n            } else {\n                resolvers.add(metadataResolver);\n            }\n\n            resolvers.stream()\n                .filter(AbstractBatchMetadataResolver.class::isInstance)\n                .map(r -> ((Iterable<EntityDescriptor>) r).iterator())\n                .map(it -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(it, Spliterator.ORDERED), false)\n                    .filter(e -> e.getSPSSODescriptor(SAMLConstants.SAML20P_NS) != null)\n                    .findFirst())\n                .forEach(descriptor -> {\n                    if (descriptor.isPresent()) {\n                        entityIDList.add(descriptor.get().getEntityID());\n                    } else {\n                        LOGGER.warn(\"Skipped registration of [{}] since no entity id could be found\", sp.getName());\n                    }\n                });\n        }\n        return entityIDList;\n    }\n\n    /**\n     * Save service only if it's not already found in the registry.\n     *\n     * @param service         the service\n     * @param servicesManager the services manager\n     */\n    public static void saveService(final RegisteredService service, final ServicesManager servicesManager) {\n        LOGGER.debug(\"Attempting to save service definition [{}]\", service);\n        servicesManager.load();\n\n        if (servicesManager.findServiceBy(registeredService -> registeredService instanceof SamlRegisteredService\n                                                               && registeredService.getServiceId().equals(service.getServiceId())).isEmpty()) {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-saml-sp-integrations/src/main/java/org/apereo/cas/util/SamlSPUtils.java#L111-L147","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nmetadataLocation = \"https://idp.example.org/idp-metadata\"; // IdP metadata, no SPSSODescriptor\n// after\nmetadataLocation = \"https://sp.example.org/saml/metadata\"; // SP metadata with SPSSODescriptor","handlingStrategy":"validation","validationCode":"val isSpMetadata = md.getEntityDescriptors().stream()\n    .anyMatch(ed -> ed.getSPSSODescriptor(SAMLConstants.SAML20P_NS) != null);\nif (!isSpMetadata) throw new IllegalArgumentException(\"Metadata is not SAML 2.0 SP metadata\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["saml","metadata","entity-descriptor"],"backgroundTag":"resource-not-found","analyzedSha":"e7288fc434b4f4505b8452e1a57e8fb3111bb863","analyzedAt":"2026-09-08T15:39:16.015Z","contentChangedAt":"2026-09-08T15:39:16.015Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}