{"record":{"id":"236a95f2372e894e","repo":"owasp-amass/amass","slug":"failed-to-obtain-the-organization-associated-with","errorCode":null,"errorMessage":"failed to obtain the Organization associated with Identifier - %s:%s","messagePattern":"failed to obtain the Organization associated with Identifier - (.+?):(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"engine/plugins/support/org/claims.go","lineNumber":76,"sourceCode":"\tif err != nil || len(ids) != 1 {\n\t\treturn nil, fmt.Errorf(\"failed to obtain the entity for Identifier - %s:%s\", oamgen.OrganizationName, name)\n\t}\n\tident := ids[0]\n\n\tif edges, err := sess.DB().IncomingEdges(ctx, ident, time.Time{}, \"id\"); err == nil && len(edges) > 0 {\n\t\tfor _, edge := range edges {\n\t\t\tif tags, err := sess.DB().FindEdgeTags(ctx, edge, time.Time{}, src.Name); err != nil || len(tags) == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif o, err := sess.DB().FindEntityById(ctx, edge.FromEntity.ID); err == nil && o != nil {\n\t\t\t\tif _, valid := o.Asset.(*oamorg.Organization); valid {\n\t\t\t\t\treturn o, nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil, fmt.Errorf(\"failed to obtain the Organization associated with Identifier - %s:%s\", oamgen.OrganizationName, name)\n}\n\nfunc CreateOrgLegalNameClaim(sess et.Session, orgent *dbt.Entity, name string, src *et.Source) (*dbt.Entity, error) {\n\tctx, cancel := context.WithTimeout(sess.Ctx(), 30*time.Second)\n\tdefer cancel()\n\n\tid := &oamgen.Identifier{\n\t\tUniqueID: fmt.Sprintf(\"%s:%s\", oamgen.LegalName, name),\n\t\tID:       name,\n\t\tType:     oamgen.LegalName,\n\t}\n\n\tident, err := sess.DB().CreateAsset(ctx, id)\n\tif err != nil || ident == nil {\n\t\treturn nil, err\n\t}\n\n\t_, err = sess.DB().CreateEntityProperty(ctx, ident, &oamgen.SourceProperty{","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/engine/plugins/support/org/claims.go#L58-L94","documentation":"FindOrgByNameClaim found the name Identifier entity but could not resolve it to an Organization asset: the incoming 'id' edges' tag filtering (by source) or edge target verification yielded no acceptable Organization. This error signals that the identifier exists in the graph but no Organization satisfying the claim's provenance was reachable from it.","triggerScenarios":"The organization_name Identifier entity exists, but IncomingEdges(ctx, ident, ..., \"id\") returns no edges, none of the edge tags match the requested source (FindEdgeTags with src.Name), or the edge's FromEntity fails verification as an Organization in the loop.","commonSituations":"Identifier entities were written by a different source than the one passed as src, so tag filtering rejects all edges; edges were pruned or the graph is partially built; the identifier was created without linking an Organization asset.","solutions":["Verify the src *et.Source name matches the source that originally created the name claim; try the lookup with the original source or without source-based tag filtering.","Inspect the graph: confirm IncomingEdges from the identifier to an Organization asset exist and edge tags are populated.","Re-run discovery from a source that can re-create the claim, since CreateOrgAsset falls through and creates a fresh Organization plus claim.","Check for stale/partial graph state (edges deleted or tags missing) and rebuild the affected subgraph."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if orgent, err := org.FindOrgByNameClaim(sess, name, src); err != nil {\n    // identifier exists but claim/provenance mismatch: try other claim types or create new asset\n    log.Printf(\"name claim unresolved for %s: %v\", name, err)\n}","preventionTips":["Keep source names stable across scans so edge tags match.","Re-create claims after graph pruning or migrations.","Inspect IncomingEdges/tags when lookups unexpectedly miss despite known claims.","Fall back to registration-ID or norm-name+jurisdiction lookups."],"tags":["database","graph-lookup","not-found","amass"],"backgroundTag":"entity-not-found","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}