# 403 forbidden error when grant admin privilege to a user

**URL:** https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089
**Category:** Support
**Created:** [September 25, 2024, 3:58pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089 "2024-09-25T15:58:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Rick\_Jing](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rick_jing/32/354677_2.png) [@Rick\_Jing](https://meta.discourse.org/u/Rick_Jing)
#### Post date: [September 25, 2024, 3:58pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089/1 "2024-09-25T15:58:32Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/7/b/6/7b6be44a8e419861772acebd0d5a4b4c9be9fb07.png)  
when I tried to grant a user admin privilege this happened, is this a bug or I missed some settings or configuration? I need help for this.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [September 25, 2024, 4:49pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089/2 "2024-09-25T16:49:48Z")

</div>

Do you have 2factor authentication enabled for your admin account? I can’t reproduce that message without having 2fa on the admin account, but with the correct 2fa code, it gets overridden and I am able to grant admin access.

---

<div class="post-metadata">

### Author: ![Rick\_Jing](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rick_jing/32/354677_2.png) [@Rick\_Jing](https://meta.discourse.org/u/Rick_Jing)
#### Post date: [September 25, 2024, 4:56pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089/3 "2024-09-25T16:56:52Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/c/0/b/c0b3102ba30d252f4f5add60d91a3713d5c41d1c.png)  
I’m not sure these are all settings for 2-factor auth, I enabled for staff before and I still have to input the code to sign-in, but I think I set it back to default earlier.  
should I disable the first one?

---

<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: [September 25, 2024, 5:02pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089/4 "2024-09-25T17:02:52Z")

</div>

That are the general settings where you can set who has to enable 2 factor authentication.  
The settings for your account are at your preferences at `{yoursite}/my/preferences/second-factor`.

---

<div class="post-metadata">

### Author: ![Rick\_Jing](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rick_jing/32/354677_2.png) [@Rick\_Jing](https://meta.discourse.org/u/Rick_Jing)
#### Post date: [September 25, 2024, 5:08pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089/5 "2024-09-25T17:08:03Z")

</div>

I tried to disable the enforce second factor on external auth, still 403, is anything else I missed configured?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [September 25, 2024, 5:09pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089/6 "2024-09-25T17:09:31Z")

</div>

I believe you need to be autheticate with 2fa yourself or disable it in your own user preferences like what Moin described above. I don’t know how your external authentication is configured though. I can reproduce the 403 you described, but with my correct 2fa code, it allows me to perform the admin action.

---

<div class="post-metadata">

### Author: ![Rick\_Jing](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rick_jing/32/354677_2.png) [@Rick\_Jing](https://meta.discourse.org/u/Rick_Jing)
#### Post date: [September 25, 2024, 5:11pm UTC](https://meta.discourse.org/t/403-forbidden-error-when-grant-admin-privilege-to-a-user/328089/7 "2024-09-25T17:11:01Z")

</div>

I will try to find out, thanks anyway
