# Granting admin rights fails for usernames with special characters when admin account has 2FA enabled

**URL:** https://meta.discourse.org/t/granting-admin-rights-fails-for-usernames-with-special-characters-when-admin-account-has-2fa-enabled/378063
**Category:** Bug
**Tags:** 2fa
**Created:** [August 10, 2025, 6:38pm UTC](https://meta.discourse.org/t/granting-admin-rights-fails-for-usernames-with-special-characters-when-admin-account-has-2fa-enabled/378063 "2025-08-10T18:38:00Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 11, 2025, 2:12pm UTC](https://meta.discourse.org/t/granting-admin-rights-fails-for-usernames-with-special-characters-when-admin-account-has-2fa-enabled/378063/5 "2025-08-11T14:12:39Z")

</div>

> [@Moin](#):
>
> Side note: Even in the first example where granting admin permissions works, an error appears in the browser console when you click the button:
> 
> > PUT https://{my-forum}/admin/users/4/grant\_admin 403 (Forbidden)

I have learned that this is expected

> [@\`run\_second\_factor!\` failing when trying to promote admin](https://meta.discourse.org/t/run-second-factor-failing-when-trying-to-promote-admin/314516/9):
>
> The 403 error is normal and expected — the frontend app catches the 403 response and interprets it as “can’t grant admin because 2FA is required, let’s navigate to the 2FA page”. What is not normal is: Can you tell me where you’re seeing this error? Is it a popup in the frontend? Error in logs? As you mention, I cannot find this error message anywhere in the entire history of the codebase, so it’s very weird.

---

_[View the full topic](https://meta.discourse.org/t/granting-admin-rights-fails-for-usernames-with-special-characters-when-admin-account-has-2fa-enabled/378063)._
