# User cannot access the resource

**URL:** <https://forum.confluent.io/t/user-cannot-access-the-resource/5027>\
**Category:** Schema Registry\
**Created:** [9 May 2022 21:07 UTC](https://forum.confluent.io/t/user-cannot-access-the-resource/5027 "2022-05-09T21:07:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akanzari](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@akanzari](https://forum.confluent.io/u/akanzari)\
**Post date:** [9 May 2022 21:07 UTC](https://forum.confluent.io/t/user-cannot-access-the-resource/5027/1 "2022-05-09T21:07:05Z")

</div>

I have the below config of kafka

```auto
spring:
   cloud:
    stream:
      bindings:
         default:
           content-type: application/*+avro
         outputAddBankAccount:
           destination: add_bank_account
           group: bank-group
           producer:
            useNativeEncoding: true
      kafka:
        binder:
          brokers: 127.0.0.1:9092
          auto-create-topics: true
          producer-properties:
            acks: -1
            retries: 2147483647
            max.in.flight.requests.per.connection : 1
            request.timeout.ms: 10000
            key.serializer: org.apache.kafka.common.serialization.StringSerializer
            value.serializer: io.confluent.kafka.serializers.KafkaAvroSerializer
            schema.registry.url: https://schema-registry1:8081,https://schema-registry2:8081
            basic.auth.credentials.source: USER_INFO
            basic.auth.user.info: test:test

```

I generate the `CreateBankAccount` using the plugin `avro-maven-plugin`

```
CreateBankAccount createBankAccount = CreateBankAccount.newBuilder()
	.setExerciceFrameworkId(event.exerciceFrameworkId).setAgreementFileId(event.agreementFileId)
	.setConventionCode(convention.getConventionCode()).build();

```

Then i pushed a message to the topic with a string key and an avro serialized payload, but i have an error

```
MessageChannel messageChannel = kafkaStreams.addBankAccount();
messageChannel.send(MessageBuilder.withPayload(createBankAccount)
	.setHeader(KafkaHeaders.MESSAGE_KEY, UUID.randomUUID().toString()).build());

```

```auto
Caused by: org.apache.kafka.common.errors.SerializationException: Error registering Avro schema{"type":"record","name":"CreateBankAccount","namespace":"com.test.serviceprovider.avro","fields":[{"name":"exerciceFrameworkId","type":{"type":"string","avro.java.string":"String"}},{"name":"agreementFileId","type":{"type":"string","avro.java.string":"String"}},{"name":"conventionCode","type":{"type":"string","avro.java.string":"String"}}]}
> Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: User cannot access the resource; error code: 403

```
