title: fabric CA client user enrolment authorisation failure
body: <p>I am trying to enroll admin after initialising fabric CA server with:</p>
  
  <pre><code> fabric-ca-server init -b “admin:adminpw”
  </code></pre>
  
  <p>And starting CA server with:</p>
  
  <pre><code>fabric-ca-server start -b “admin:adminpw”
  </code></pre>
  
  <p>At client-side, enroll command:</p>
  
  <pre><code>fabric-ca-client enroll -u http://admin:adminpw@localhost:7054
  </code></pre>
  
  <p>Client-side error message:</p>
  
  <pre><code>[INFO] generating key: &amp;{A:ecdsa S:256}
  [INFO] encoded CSR
  Error: Response from server: Error Code: 20 - Authorization failure
  </code></pre>
  
  <p>Server-side:</p>
  
  <pre><code>fabric-ca-server start -b “admin:adminpw”
  2018/08/27 14:48:57 [INFO] Configuration file location: 
  /home/nadeem/Documents/Fabric-CA/server/fabric-ca-server-config.yaml
  2018/08/27 14:48:57 [INFO] Starting server in home directory: 
  /home/nadeem/Documents/Fabric-CA/server
  2018/08/27 14:48:57 [INFO] Server Version: 1.2.1-snapshot-3bcdbb2
  2018/08/27 14:48:57 [INFO] Server Levels: &amp;{Identity:1 Affiliation:1 
  Certificate:1 Credential:1 RAInfo:1 Nonce:1}
  2018/08/27 14:48:57 [INFO] The CA key and certificate already exist
  2018/08/27 14:48:57 [INFO] The key is stored by BCCSP provider 'SW'
  2018/08/27 14:48:57 [INFO] The certificate is at: 
  /home/nadeem/Documents/Fabric-CA/server/ca-cert.pem
  2018/08/27 14:48:57 [INFO] Initialized sqlite3 database at 
  /home/nadeem/Documents/Fabric-CA/server/fabric-ca-server.db
  2018/08/27 14:48:57 [INFO] Home directory for default CA: 
  /home/nadeem/Documents/Fabric-CA/server
  2018/08/27 14:48:57 [INFO] Listening on http://0.0.0.0:7054
  ***2018/08/27 14:49:34 [INFO] 127.0.0.1:46350 POST /enroll 401 23 "Failed 
  to get user: : scode: 404, code: 63, msg: Failed to get User: sql: no 
  rows in result set"***
  </code></pre>
  
  <p>fabric-ca-client/server:</p>
  
  <blockquote>
    <p>Version: 1.2.1-snapshot-3bcdbb2  Go version: go1.11  OS/Arch:
    linux/amd64</p>
  </blockquote>
  
  <p>Found similar post here:</p>
  
  <blockquote>
    <p><a href="https://jira.hyperledger.org/browse/FABC-302" rel="nofollow noreferrer">https://jira.hyperledger.org/browse/FABC-302</a></p>
  </blockquote>
  
  <p>It is marked resolved with v1.2 but there are no clear instructions on how to resolve it now.
  Thanks :)</p>