AWS Cognito NotAuthorizedException A client attempted to write unauthorized attribute

__type'':notauthorizedexception'',message'':a client attempted to write unauthorized attribute
signup operation a client attempted to write unauthorized attribute
cognito update user attributes
cognito custom attributes in token
notauthorizedexception cognito
cognito custom attribute mutable
cognito user attributes
cognito custom attribute max length

I'm using AWS Cognito and aws-cpp-sdk for my application. I defined a user pool and an application, then I got app client id and app secret. I can create user pool object:

    Aws::Client::ClientConfiguration clientConfig;
    clientConfig.region =
        Aws::Region::EU_CENTRAL_1;  // "RegionEndpoint.EUCentral1";
    clientConfig.scheme = Aws::Http::Scheme::HTTPS;
    clientConfig.connectTimeoutMs = 30000;
    clientConfig.requestTimeoutMs = 600000;

    CognitoIdentityProviderClient client;
    client = CognitoIdentityProviderClient(clientConfig);

    DescribeUserPoolClientRequest describeUserPoolClientRequest;
    describeUserPoolClientRequest.WithUserPoolId(POOL_ID)
        .WithClientId(TEST_APP_CLIENT_ID);
    DescribeUserPoolClientOutcome describeUserPoolClientOutcome =
        client.DescribeUserPoolClient(describeUserPoolClientRequest);

After I defined an user with SignUpRequest, there was an error like this: NotAuthorizedException A client attempted to write unauthorized attribute

This is my signup code:

    SignUpRequest signUpRequest;
    signUpRequest.SetClientId(describeUserPoolClientOutcome.GetResult()
                                  .GetUserPoolClient()
                                  .GetClientId());
    signUpRequest.SetUsername("xxxxx");
    signUpRequest.SetPassword("xxxxxx?");
    AttributeType email, phone_number, gender, given_name, family_name, picture;
    email.WithName("email").WithValue("gacer@ku.edu.tr");
    phone_number.WithName("phone_number").WithValue("+xxxxx");
    given_name.WithName("given_name").WithValue("xxx");
    family_name.WithName("familiy_name").WithValue("xxx");
    gender.WithName("gender").WithValue("MALE");
    picture.WithName("picture").WithValue(
        "http://xxxx");
    signUpRequest.AddUserAttributes(email);
    signUpRequest.AddUserAttributes(phone_number);
    signUpRequest.AddUserAttributes(given_name);
    signUpRequest.AddUserAttributes(family_name);
    signUpRequest.AddUserAttributes(gender);
    signUpRequest.AddUserAttributes(picture);

    SignUpOutcome signUpOutcome = client.SignUp(signUpRequest);

What is the problem? How can I solve it?

In the AWS website go to your User Pool -> Apps -> Show Details -> Set attribute read write permissions. Make sure every attribute you are trying to write i in the writeable attributes list and they have a checkmark.

A client attempted to write unauthorized attribute in android, 2 Answers. This error is due to the Cognito app client not having the write permissions for an attribute. In your Cognito userpool console, go to your userpool --> General settings--> App clients. I'm trying to use Cognito using the browser Javascript example and I hit: NotAuthorizedException: A client attempted to write unauthorized attribute. even though the clientId is configured to have all the necessary write permissions. This is my code:

I have same problem but it was resolved by adding custom: in other attributes. While you are adding custom attributes you need to add

custom:family_name

NotAuthorizedException: A client attempted to write , Hi, I'm trying to use Cognito using the browser Javascript example and I hit: NotAuthorizedException: A client attempted to write unauthorized attribute #1319 @aws aws locked as resolved and limited conversation to collaborators on Jul 8� AWS Cognito NotAuthorizedException A client attempted to write unauthorized attribute. 17. How to confirm user in Cognito User Pools without verifying email or phone? 1.

Omg! The reason of exception is only writing mistake. The problem is solved by correcting typing error from familiy to family at this line:

family_name.WithName("familiy_name").WithValue("xxx");

Signup a user always fails to an error, I'm quite new to aws Cognito and having a problem to signup a user to my userpool. In my iOS app I Code=11 "(null)" UserInfo={__type= NotAuthorizedException, message=A client attempted to write unauthorized attribute}. This error is due to the Cognito app client not having the write permissions for an attribute. In your Cognito userpool console, go to your userpool --> General settings--> App clients. Select the client being used and click on Show details Click on Set attribute read & write permissions

Amazon Cognito "A client attempted to write unauthorized attribute", Amazon Cognito "A client attempted to write unauthorized attribute" I'm using the JavaScript SDK for AWS Cognito, and there are a couple of custom attributes that I {"__type":"NotAuthorizedException","message":"A client attempted to write � Amazon Cognito “A client attempted to write unauthorized attribute” (2) 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. The problem attributes are mutable string fields as follows:

How to fix “A client attempted to write unauthorized attribute” issue in , I`m facing a problem with signUp in cognito, some times it shows error as below : { "code": "NotAuthorizedException", "name": "NotAuthorizedException",� Describe the bug I'm trying to add custom attributes to the signup form generated by AmplifySignUp from @aws-amplify/ui-react. Additional standard attributes (e.g. name) work fine. However, cus

NotAuthorizedException: A client attempted to write , Hi, I'm trying to use Cognito using the browser Javascript example and I hit: NotAuthorizedException: A client attempted to write unauthorized attribute AWSCognito.config.region = 'us-east-1'; AWSCognito.config.credentials = new AWS. @crivera Write permissions can be set in your AWS Cognito users console. Select your user pool, then go to Apps. Select your user pool, then go to Apps. Select your app (if you have more than one), click the "Show Details" button and you will see the link to "Set attribute read and write permissions"

Comments
  • Thank you for reply. I applied it, but the problem is still there.