Zum Inhalt springen

Enabling account deletion by users

You need the following steps

Step 1: Enabling the Delete Account Capability

  1. Click Authentication in the menu.
  2. Click the Required Actions tab.
  3. Select Enabled on the Delete Account 

Step 2: Add the delete-account role eihter to an user (Option 1 ) or to a default role ( Option 2)

Option 1: Giving a user the delete-account role

  1. Click Users in the menu.
  2. Select a user.
  3. Click the Role Mappings tab.
  4. From the Client Roles list, select account.
  5. Under Available Roles, select delete-account.
  6. Click Add selected.

Once you have the delete-account role, you can delete your own account.

Option 2: Adding a default Group with delete-account role

Default Groups

Default groups allow you to automatically assign group membership whenever any new user is created or imported through User Storage Federation or Identity Brokering. To specify default groups go to the Groups left menu item, and click the Default Groups tab

Add  delete-account role to the new Default Group

ADD newly created Default Group to Default Groups


Delete your account

  1. Log into the Account Console via Url : http://localhost:8280/auth/realms/RBAC/account/#/personal-info
  2. At the bottom of the Personal Info page, click Delete Account.
  • Click on Delete
  • Note: You need to login again with Username and Password
  • Finally confirm the account deletion process

Code for Angular App

  ngOnInit(): void {
    window.location.href = environment.keycloakURL +  'realms/RBAC/account/#/personal-info';
  }

Reference

Published inAllgemein

Sei der Erste der einen Kommentar abgibt

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert