# Unable to update UI setting Request failed with status code: 403

**URL:** https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409
**Category:** Kibana
**Created:** [September 27, 2019, 1:50pm UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409 "2019-09-27T13:50:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![astrobalaji](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astrobalaji/32/52693_2.png) [@astrobalaji](https://discuss.elastic.co/u/astrobalaji)
#### Post date: [September 27, 2019, 1:50pm UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409/1 "2019-09-27T13:50:00Z")

</div>

Hi guys,

I am not sure what I am doing wrong here. I am automatically updating user security roles also for the spaces through the kibana API. And when I login from one of those roles, I keep getting this error.

Unable to update UI setting

Request failed with status code: 403

here's a picture of it,

![image](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f732bfa937a748f28bc05792b388ac529ace93dc.png)

Can anyone help me out of it??

Thanks in advance

Cheers,  
Balaji

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [September 27, 2019, 2:10pm UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409/2 "2019-09-27T14:10:09Z")

</div>

[403](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) is http code response code that indicates that the server understood the request but refused to authorize it.

Its likely that your user's role does not have access to .kibana index. This is the index that stores all kibana state. What are the privileges for the role?

---

<div class="post-metadata">

### Author: ![astrobalaji](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astrobalaji/32/52693_2.png) [@astrobalaji](https://discuss.elastic.co/u/astrobalaji)
#### Post date: [September 27, 2019, 2:27pm UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409/3 "2019-09-27T14:27:09Z")

</div>

Hey Nathan,

Thanks for the reply.

Here's the json of the role.  
' {  
"name": "template\_space\_role",  
"metadata": {},  
"transient\_metadata": {  
"enabled": true  
},  
"elasticsearch": {  
"cluster": ,  
"indices": [  
{  
"names": [  
".kibana"  
],  
"privileges": [  
"read"  
],  
"allow\_restricted\_indices": false  
}  
],  
"run\_as":   
},  
"kibana": [  
{  
"base": [  
"read"  
],  
"feature": {},  
"spaces": [  
"default"  
]  
}  
],  
"\_transform\_error": ,  
"\_unrecognized\_applications":   
}'

I use this as my template json for the PUT request dynamically updating the space name.

Thanks again 🙂

Cheers,  
Balaji

---

<div class="post-metadata">

### Author: ![pemontto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pemontto/32/3908_2.png) [@pemontto](https://discuss.elastic.co/u/pemontto)
#### Post date: [October 14, 2019, 9:54am UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409/4 "2019-10-14T09:54:01Z")

</div>

Did you manage to solve this issue?

I'm running on 7.4.0 and get this whenever I browse to the Dashboards app as a `test` user in the `test` space it tries to make a POST request to `https://kibana:5601/s/test/api/kibana/settings` with this payload `{"changes":{"defaultIndex":"cdb47b30-ee5c-11e9-a95d-d5689c2d15d1"}}`.

@Nathan_Reese I wouldn't have expected end users to need access to the .kibana indices as those actions would be performed by the kibana\_system user on behalf of the end user?

**GET /api/security/v1/users/\_customer\_test**

```json
{
    "username": "_customer_test",
    "roles": [
        "_customer_test"
    ],
    "full_name": "Test Industries Limited",
    "email": "",
    "metadata": {},
    "enabled": true
}

```

**GET /api/security/role/\_customer\_test**

```json
{
    "name": "_customer_test",
    "metadata": {},
    "transient_metadata": {
        "enabled": true
    },
    "elasticsearch": {
        "cluster": [],
        "indices": [
            {
                "names": [
                    "test-*"
                ],
                "privileges": [
                    "read",
                    "view_index_metadata"
                ],
                "allow_restricted_indices": false
            }
        ],
        "run_as": []
    },
    "kibana": [
        {
            "base": [],
            "feature": {
                "discover": [
                    "all"
                ],
                "visualize": [
                    "all"
                ],
                "dashboard": [
                    "all"
                ],
                "maps": [
                    "all"
                ],
                "canvas": [
                    "all"
                ]
            },
            "spaces": [
                "test"
            ]
        }
    ],
    "_transform_error": [],
    "_unrecognized_applications": []
}

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 11, 2019, 9:54am UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409/5 "2019-11-11T09:54:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 15, 2020, 11:27am UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409/6 "2020-10-15T11:27:28Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 4, 2022, 7:27am UTC](https://discuss.elastic.co/t/unable-to-update-ui-setting-request-failed-with-status-code-403/201409/7 "2022-11-04T07:27:14Z")

</div>


