Skip to content

Authelia: Problem with user roles #217

@carlosjfcasero

Description

@carlosjfcasero

I have integrated Opencloud with Authelia. In web everything is working, but in desktop I get following error in server when I try to login:

opencloud  | 2025-04-18T18:50:48Z ERR Error mapping role names to role ids error="no roles in user claims" line=github.com/opencloud-eu/opencloud/services/proxy/pkg/userroles/oidcroles.go:84 request-id=58733e08-061f-4caa-876a-d68132cb6a09 service=proxy userid=e15359ea-ef03-4785-8cb3-564a93372e6d
opencloud  | 2025-04-18T18:50:48Z ERR Could not get user roles error="no roles in user claims" line=github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/account_resolver.go:174 service=proxy

It seems Opencloud is not retrieving correctly the claims from Authelia, but I don't know why. I have followed integration with external OIDC doc and checked troubleshooting page but didn't find my issue.

My Authelia users configuration (only web and desktop part, used my ocis config as reference to build it) is

      - client_id: web
        client_name: 'OpenCloud web'
        public: true
        redirect_uris:
          - 'https://opencloud.tld/'
          - 'https://opencloud.tld/oidc-callback.html'
          - 'https://opencloud.tld/oidc-silent-redirect.html'
      - client_id: 'OpenCloudDesktop'
        client_name: 'openCloud desktop client'
        public: true
        scopes:
          - openid
          - groups
          - profile
          - email
          - offline_access
        redirect_uris:
          - http://127.0.0.1
          - http://localhost
        grant_types:
          - refresh_token
          - authorization_code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions