# Boolean mapper for getting admin-permissions in nextcloud

**URL:** <https://forum.keycloak.org/t/boolean-mapper-for-getting-admin-permissions-in-nextcloud/28299>\
**Category:** Getting advice\
**Created:** [October 13, 2024, 8:02am UTC](https://forum.keycloak.org/t/boolean-mapper-for-getting-admin-permissions-in-nextcloud/28299 "2024-10-13T08:02:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![3c581abd](https://avatars.discourse-cdn.com/v4/letter/3/7c8e57/32.png) [@3c581abd](https://forum.keycloak.org/u/3c581abd)\
**Post date:** [October 13, 2024, 8:02am UTC](https://forum.keycloak.org/t/boolean-mapper-for-getting-admin-permissions-in-nextcloud/28299/1 "2024-10-13T08:02:12Z")

</div>

Hi!

I try to use keycloak for my nextcloud with oidc login app in nextcloud.

There are some oidc\_login\_attributes as

```auto
  'oidc_login_attributes' => array ( 
    'id' => 'preferred_username', 
    'name' => 'name', 
    'mail' => 'email', 
    //'quota' => 'ownCloudQuota', 
    'groups' => 'ownCloudGroups', 
    'is_admin' => 'ownCloudAdmin',
)

```

and i try to figure out, to get the “is\_admin” working.  
So i think, the Token Claim Name should be for example “ownCloudAdmin” and a boolean value.

But i have no idea, how to map in case from the existance of a role (for example “perm-app-nextcloud\_admins”) get a true or false into the token.

I found this  
[https://wiki.hostsharing.net/index.php/Keycloak\_installieren](https://wiki.hostsharing.net/index.php/Keycloak_installieren)  
but not advice how to configure the ownCloudAdmin.  
And my websearch for this, is\_admin and similar search-phrases did not make me any wiser… So i came back here to ask, if someone solved this before.

My setup is a keycloak with ldap as backend for users, groups and so on.  
In ldap have the group perm-app-nextcloud\_admins. And if a user is a member of this group, the user should get admin-permission on the nextcloud instance. It the user is not member of this group, it should be only a “normal” user.

Any ideas?

thank you

Jakob
