403 error during GetAppSchemas

I have…

  • Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
  • Used code blocks with ``` to format my code examples like JSON or logs properly.

I’m submitting a…

  • Bug report

Current behavior

configurationUnhandled exception. HTTP Response: Forbidden | traceId=00-4be5de8706c08a90b1c44f7b1bd23508-1bacffb78bd274eb-01 type=RFC 7231: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content statusCode=403Squidex.ClientLibrary.Management.SquidexManagementException: The HTTP status code of the response was not expected (403).Status: 403Response: Forbidden | traceId=00-4be5de8706c08a90b1c44f7b1bd23508-1bacffb78bd274eb-01 type=RFC 7231: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content statusCode=403 at Squidex.ClientLibrary.Management.SchemasClient.GetSchemasAsync(String app, CancellationToken cancellationToken)

Expected behavior

Shouldn’t failed by 403 error code

Minimal reproduction of the problem

I created a .Net core app, use
public async Task<SchemasDto> GetAppSchemas(CancellationToken cancellationToken) { var schemasClient = _clientManager.CreateSchemasClient(); var schemas = await schemasClient.GetSchemasAsync(_options.AppName, cancellationToken); return schemas; }

Environment

App Name: commerce-management

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: 14.2.0

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:

Please format your code properly using code blocks (using markdown syntax)

I was format my code, thanks

public async Task<SchemasDto> GetAppSchemas(CancellationToken cancellationToken) 
{ 
    var schemasClient = _clientManager.CreateSchemasClient(); 
    var schemas = await schemasClient.GetSchemasAsync(_options.AppName, cancellationToken); 
    return schemas; 
}

@Sebastian please help

Sorry, I have no idea what the problem would be. Which client ID do you use?

Is it simply the case that the Reader role does not have permission to GetSchemasAsync?

The built in role can only read assets and contents: squidex/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Roles.cs at master · Squidex/squidex · GitHub

Thank you @slalFe

Each role has some implicit permissions and I have forgotten that they are only given for the frontend: squidex/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Role.cs at ace9db6e8d85b1f29ba0e948ee9ce2a54b367802 · Squidex/squidex · GitHub

1 Like

So to summarize it: Use a developer role or custom role.