0

I am trying to run the following command against a hyperledger 1.0 instance: fabric-ca-client affiliation list --caname PeerOrg1CA the response I get is: Error: Response from server: Error Code: 0 - User does not have attribute 'hf.AffiliationMgr'

The user I am running the command with is the admin user for that CA. I would like to be able to manage user affiliations. The documentation is a bit fuzzy on this.

How do I alter the affiliation for the admin user?

2 Answers2

0

You adjust the hf.AffiliationMgr attribute within the fabric-ca-server-config.yaml manually. Or you can pass it in as a flag when you register the admin identity with the id.attrs.

smeyers
  • 333
  • 1
  • 12
0

To be able to get a list of affiliations, the invoker of the command must possess the attribute 'hf.AffiliationMgr'. If the invoker does not posses this attribute, you have two options:

  1. An admin registers a new identity that has the attribute 'hf.AffiliationMgr', then you use this identity to list affiliations.

OR

  1. An admin can modify an existing identity to add the attribute 'hf.AffiliationMgr', once this has been completely successfully. The already existing identity should also now be able to list affiliations.
Saad Karim
  • 229
  • 2
  • 10