Skip to content

[Linked Roles] Auto-granted role not being removed after metadata cleared to 0 #8524

Description

@TANK-49

Description

When updating a user's Application Role Connection metadata via PUT /users/@me/applications/{app_id}/role-connection to clear all values (pushing all zeros/empty states), the API correctly returns a 200 OK and re-fetching the route confirms the metadata is updated. However, Discord's automated backend worker is failing to revoke/remove the auto-granted linked role from the member in servers where that role is configured. Initial grants are functioning normally, but automatic revocation/re-evaluation has stopped working entirely.

Steps to Reproduce

  1. Set up a Linked Role in a server tied to your application with a specific requirement (e.g., an integer metadata field > 0 or a boolean field).
  2. Authenticate a test user through the OAuth2 flow (role_connections.write scope) so they acquire the linked role.
  3. Send a PUT /users/@me/applications/{app_id}/role-connection request using the user's Bearer token with all metadata fields cleared/set to 0 (or false equivalents).
  4. API Response: 200 OK. Subsequent GET requests confirm metadata fields are successfully zeroed out.
  5. Observed Failure: Check the guild member list; the user retains the linked role indefinitely, and no automated revocation occurs.

Expected Behavior

When a user's role connection metadata is cleared or no longer meets the server's criteria, Discord should automatically strip the linked role from the user shortly after the metadata update is processed.

Current Behavior

The metadata updates successfully via the API, but the linked role remains assigned to the user. No automatic revocation takes place.

Screenshots/Videos

No response

Client and System Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions