{"record":{"id":"6eb882eaaedfaf15","repo":"apereo/cas","slug":"cannot-find-metadata-linked-to","errorCode":null,"errorMessage":"Cannot find metadata linked to [{}]","messagePattern":"Cannot find metadata linked to \\[(.+?)\\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/slo/SamlIdPSingleLogoutServiceLogoutUrlBuilder.java","lineNumber":102,"sourceCode":"                                                     final WebApplicationService singleLogoutService) {\n        LOGGER.trace(\"Building logout url for SAML service [{}]\", registeredService);\n\n        val samlRegisteredService = (SamlRegisteredService) registeredService;\n        val extractionResult = SamlIdPServiceAttributeExtractor.extract(registeredService, singleLogoutService);\n        val entityID = extractionResult\n            .map(pair -> {\n                val attribute = pair.getLeft();\n                val attributeValue = pair.getRight();\n                LOGGER.trace(\"Located service attribute [{}] with value [{}]\", attribute, attributeValue);\n                return attribute.getEntityIdFrom(samlRegisteredServiceCachingMetadataResolver, attributeValue);\n            })\n            .orElseGet(singleLogoutService::getId);\n        LOGGER.trace(\"Located entity id [{}]\", entityID);\n\n        val adaptorRes = SamlRegisteredServiceMetadataAdaptor.get(\n            samlRegisteredServiceCachingMetadataResolver, samlRegisteredService, entityID);\n        if (adaptorRes.isEmpty()) {\n            LOGGER.warn(\"Cannot find metadata linked to [{}]\", entityID);\n            return null;\n        }\n        val adaptor = adaptorRes.get();\n        for (val binding : this.logoutRequestBindings) {\n            var sloService = adaptor.getSingleLogoutService(binding);\n            if (sloService != null) {\n                return finalizeSingleLogoutUrl(sloService, samlRegisteredService);\n            }\n        }\n        LOGGER.warn(\"Cannot find SLO service in metadata for entity id [{}]\", entityID);\n        return null;\n    }\n\n    private static @Nullable SingleLogoutUrl finalizeSingleLogoutUrl(final SingleLogoutService sloService, final SamlRegisteredService service) {\n        val location = StringUtils.isBlank(sloService.getResponseLocation())\n            ? sloService.getLocation()\n            : sloService.getResponseLocation();\n        if (StringUtils.isNotBlank(location)) {","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/slo/SamlIdPSingleLogoutServiceLogoutUrlBuilder.java#L84-L120","documentation":"When CAS builds single-logout URLs for a SAML service, it looks up the SP's metadata entity to find SLO endpoints. If no metadata adaptor/EntityDescriptor exists for the resolved entity id, this warning is logged and the method returns null, meaning no logout URL is produced for that service.","triggerScenarios":"supports()/location() call buildLogoutUrl for a service whose entityID (from the logout request or service config) is absent from the metadata resolver cache for the matched SamlRegisteredService.","commonSituations":"SP metadata missing or stale; wrong metadata location configured for the service; entityID configured in the service definition differs from the one in metadata; URL-based metadata temporarily unreachable.","solutions":["Confirm the entityID resolves in the configured metadata (open the metadata XML/URL and search for it).","Fix the metadata resource/URL in the registered service definition.","Clear/refresh the metadata caching resolver so the latest metadata is loaded.","If the SP does not support SLO, this is benign — ensure back-channel logout handles the null URL gracefully."],"exampleFix":"// before (service definition)\n\"metadataLocation\": \"file:/etc/cas/saml/old-sp.xml\"\n// after\n\"metadataLocation\": \"file:/etc/cas/saml/sp-metadata.xml\"","handlingStrategy":"validation","validationCode":"var adaptorRes = SamlRegisteredServiceMetadataAdaptor.get(resolver, service, entityID);\nif (adaptorRes.isEmpty()) {\n    // skip building logout URL for this service\n    return null;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate every registered service's metadataLocation resolves its entityID at registration time.","Use CAS actuator/service endpoints to check metadata resolution.","Keep metadata aggregates updated and monitored."],"tags":["saml","metadata","slo"],"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"}