{"record":{"id":"e064724b52b8d200","repo":"hyperledger/fabric","slug":"no-org-found-in-channel-with-mspid-s","errorCode":null,"errorMessage":"no org found in channel with MSPID '%s'","messagePattern":"no org found in channel with MSPID '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/chaincode/lifecycle/deployedcc_infoprovider.go","lineNumber":285,"sourceCode":"\tif channelConfig == nil {\n\t\treturn nil, errors.Errorf(\"could not get channel config for channel '%s'\", channelID), nil\n\t}\n\n\tac, ok := channelConfig.ApplicationConfig()\n\tif !ok {\n\t\treturn nil, errors.Errorf(\"could not get application config for channel '%s'\", channelID), nil\n\t}\n\n\tmatchedOrgName := \"\"\n\tfor orgName, org := range ac.Organizations() {\n\t\tif org.MSPID() == orgMSPID {\n\t\t\tmatchedOrgName = orgName\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif matchedOrgName == \"\" {\n\t\treturn nil, nil, errors.Errorf(\"no org found in channel with MSPID '%s'\", orgMSPID)\n\t}\n\n\tpolicyName := fmt.Sprintf(\"/Channel/Application/%s/Endorsement\", matchedOrgName)\n\tif _, ok := channelConfig.PolicyManager().GetPolicy(policyName); ok {\n\t\treturn protoutil.MarshalOrPanic(&cb.ApplicationPolicy{\n\t\t\tType: &cb.ApplicationPolicy_ChannelConfigPolicyReference{\n\t\t\t\tChannelConfigPolicyReference: policyName,\n\t\t\t},\n\t\t}), nil, nil\n\t}\n\n\t// This was a channel which was upgraded or did not define an org level endorsement policy, use a default\n\t// of \"any member of the org\"\n\n\treturn protoutil.MarshalOrPanic(&cb.ApplicationPolicy{\n\t\tType: &cb.ApplicationPolicy_SignaturePolicy{\n\t\t\tSignaturePolicy: policydsl.SignedByAnyMember([]string{orgMSPID}),\n\t\t},","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/chaincode/lifecycle/deployedcc_infoprovider.go#L267-L303","documentation":"ImplicitCollectionEndorsementPolicyAsBytes returns this when it scans ac.Organizations() for an org whose MSPID equals orgMSPID and finds none. The implicit collection for that org cannot be built because the org is not a member of the channel's application config. Unlike the previous two errors, this is returned as validationErr, so it fails the transaction validation.","triggerScenarios":"CollectionValidationInfo is asked for the endorsement policy bytes of an implicit collection _implicit_org_<MSPID> where <MSPID> does not appear among the channel's Application organizations.","commonSituations":"Org removed from the channel but old data/private collections still reference it; MSPID case mismatch (MSPIDs are case-sensitive); validating a chaincode's collections.json that names an org never added to the channel.","solutions":["Confirm the exact MSPID spelling in the collection definition matches an org in the channel config (case-sensitive).","Add the missing organization to the channel's Application organizations via a config update.","Update the chaincode's collection configuration to remove references to orgs not on the channel, then commit a new chaincode definition."],"exampleFix":"// before (collections.json references org not on channel)\n{\"name\":\"col\",\"implicitCollectionOrgMSPIDs\":[\"Org3MSP\"]}\n// after (only MSPIDs present in channel Application config)\n{\"name\":\"col\",\"implicitCollectionOrgMSPIDs\":[\"Org1MSP\",\"Org2MSP\"]}","handlingStrategy":"validation","validationCode":"// Go: ensure every MSPID in the collection config is an org on the channel\nac, ok := channelConfig.ApplicationConfig()\nif !ok { return err }\norgMSPIDs := map[string]bool{}\nfor _, org := range ac.Organizations() { orgMSPIDs[org.MSPID()] = true }\nfor _, msp := range coll.ImplicitCollectionOrgMSPIDs {\n  if !orgMSPIDs[msp] { return fmt.Errorf(\"org %s not on channel\", msp) }\n}","typeGuard":null,"tryCatchPattern":"if validationErr != nil {\n  if strings.Contains(validationErr.Error(), \"no org found in channel with MSPID\") {\n    // fix collection definition or add org via config update\n  }\n}","preventionTips":["Keep collections.json MSPIDs in sync with channel membership (case-sensitive).","Run checkcommitreadiness/peer collection listing before commit.","Update collections config whenever orgs join/leave the channel.","Never reuse collection definitions across channels blindly."],"tags":["hyperledger-fabric","implicit-collection","msp","collection-definition","validation"],"backgroundTag":"org-not-in-channel-config","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}