title: Amazon Cognito "A client attempted to write unauthorized attribute"
body: <p>I'm using the JavaScript SDK for AWS Cognito, and there are a couple of custom attributes that I just can't seem to save to and can't see why.</p>
  
  <p>The problem attributes are mutable string fields as follows:</p>
  
  <pre><code>custom: role
  custom: recruitingrole
  custom: title
  </code></pre>
  
  <p>Other custom fields in the same request seem to update OK.  Specifically, these ones seem to work:</p>
  
  <pre><code>custom:division
  custom:linkedin
  custom:location
  custom:bio
  </code></pre>
  
  <p>When I submit via the SDK, this is returned:</p>
  
  <p>{"__type":"NotAuthorizedException","message":"A client attempted to write unauthorized attribute"}</p>
  
  <p>Here is the data that is sent, as show in the Chrome developer console network output:</p>
  
  <pre><code>{
      "AccessToken": "",
      "UserAttributes": [{
          "Name": "name",
          "Value": "Steve Austin"
      }, {
          "Name": "custom:company",
          "Value": "OSI"
      }, {
          "Name": "custom:division",
          "Value": "Bionics"
      }, {
          "Name": "custom:recruitingrole",
          "Value": "other"
      }, {
          "Name": "custom:linkedin",
          "Value": "http://www.linkedin.com"
      }, {
          "Name": "custom:location",
          "Value": "Mexico City, Mexico City, Mexico"
      }, {
          "Name": "custom:bio",
          "Value": "A man barely alive."
      }]
  }
  </code></pre>
  
  <p>Can anyone suggest why I can't save to these attributes?</p>
  
  <p>thanks</p>