# Illegal User Settings

**URL:** https://discuss.elastic.co/t/illegal-user-settings/65610
**Category:** Elasticsearch
**Created:** [November 10, 2016, 9:20am UTC](https://discuss.elastic.co/t/illegal-user-settings/65610 "2016-11-10T09:20:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Sudhir\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhir_kumar/32/13080_2.png) [@Sudhir\_Kumar](https://discuss.elastic.co/u/Sudhir_Kumar)
#### Post date: [November 10, 2016, 9:20am UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/1 "2016-11-10T09:20:12Z")

</div>

Hi I am getting an illegal User Settings error while updating user settings.

I am using Elasticsearch 2.4.1 when i have updated user settings and click on Update getting an error saying Illegal User Settings. I am trying to update SMTP settings

Below is the configuration I am trying to update  
xpack.notification.email.account:  
gmail\_account:  
profile: gmail  
smtp:  
auth: true  
starttls.enable: true  
host: [smtp.gmail.com](http://smtp.gmail.com)  
port: 587  
user: _username_  
password: _password_

Error message is as below:

{  
"msg": "Illegal user settings",  
"ok": false,  
"detail": {  
"errors": [  
"'xpack.notification.email.account.gmail\_account.smtp.starttls.enable': is not allowed",  
"'xpack.notification.email.account.gmail\_account.smtp.password': is not allowed",  
"'xpack.notification.email.account.gmail\_account.smtp.port': is not allowed",  
"'xpack.notification.email.account.gmail\_account.smtp.user': is not allowed",  
"'xpack.notification.email.account.gmail\_account.profile': is not allowed",  
"'xpack.notification.email.account.gmail\_account.smtp.host': is not allowed",  
"'xpack.notification.email.account.gmail\_account.smtp.auth': is not allowed"  
]  
},  
"error": "BadRequest"  
}

Can someone please provide me a sample for elasticsearch 2.4.1

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [November 10, 2016, 9:34am UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/2 "2016-11-10T09:34:07Z")

</div>

Hey,

x-pack configuration settings are supposed to work with Elasticsearch 5.0 and upwards. You need to configure those settings using the `watcher` prefix. See [the docs](https://www.elastic.co/guide/en/watcher/2.4/email-services.html#email-account) for an example.

--Alex

---

<div class="post-metadata">

### Author: ![Sudhir\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhir_kumar/32/13080_2.png) [@Sudhir\_Kumar](https://discuss.elastic.co/u/Sudhir_Kumar)
#### Post date: [November 10, 2016, 9:57am UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/3 "2016-11-10T09:57:46Z")

</div>

Hi Alexander,

Thanks for responding. I have tried with watcher prefix as well. I got the similar Error Response.  
watcher.actions.email.service.account:  
gmail\_account:  
profile: gmail  
smtp:  
auth: true  
starttls.enable: true  
host: [smtp.gmail.com](http://smtp.gmail.com)  
port: 587  
user: username  
password: password

{  
"msg": "Illegal user settings",  
"ok": false,  
"detail": {  
"errors": [  
"'watcher.actions.email.service.account.gmail\_account.smtp.host': is not allowed",  
"'watcher.actions.email.service.account.gmail\_account.profile': is not allowed",  
"'watcher.actions.email.service.account.gmail\_account.smtp.port': is not allowed",  
"'watcher.actions.email.service.account.gmail\_account.smtp.user': is not allowed",  
"'watcher.actions.email.service.account.gmail\_account.smtp.password': is not allowed",  
"'watcher.actions.email.service.account.gmail\_account.smtp.auth': is not allowed",  
"'watcher.actions.email.service.account.gmail\_account.smtp.starttls.enable': is not allowed"  
]  
},  
"error": "BadRequest"  
}

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [November 10, 2016, 10:29am UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/4 "2016-11-10T10:29:20Z")

</div>

Hey,

sorry I misread your initial post and was focused on x-pack. The email settings are not dynamic properties, but have to be configured statically in your config file and cannot be updated at run-time.

However I am still confused a bit by this JSON. Which call did you execute to get that response? Was it a cluster udpate settings call? Can you show the exact HTTP call you executed including URL, host and body?

--Alex

---

<div class="post-metadata">

### Author: ![Sudhir\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhir_kumar/32/13080_2.png) [@Sudhir\_Kumar](https://discuss.elastic.co/u/Sudhir_Kumar)
#### Post date: [November 10, 2016, 2:24pm UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/5 "2016-11-10T14:24:17Z")

</div>

Hi Alex,

I am using the hosted cluster. I am trying to update user settings from portal.

URL: [https://api.found.no/api/v0/clusters/us-east-1/b0a4ab1f733156e01cb0197bd8761302](https://api.found.no/api/v0/clusters/us-east-1/b0a4ab1f733156e01cb0197bd8761302)

PayLoad

{"scripting":{"inline":"sandbox","indexed":"sandbox","file":"sandbox"},"auto\_create\_index":true,"capacity":"1024","region":"us-east-1","availability\_zones":"1","version":"5.0.0","destructive\_requires\_name":false,"ssd":true,"user\_plugins":,"plugins":,"user\_id":19283115,"created":"2016-11-10T14:12:10Z","txid":79664045,"cluster\_id":"b0a4ab1f733156e01cb0197bd8761302","is\_hidden":false,"identifier":null,"data":{"name":"sudhir"},"extra\_user\_settings\_source":"watcher.actions.email.service.account:\n gmail\_account:\n profile: gmail\n smtp:\n auth: true\n starttls.enable: true\n host: [smtp.gmail.com](http://smtp.gmail.com)\n port: 587\n user: username\n password: 'password'"}

 ![](https://us1.discourse-cdn.com/elastic/original/2X/6/624a1cf02a42b069eb4b276ba1c2be8517773d82.png)

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [November 11, 2016, 1:47pm UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/6 "2016-11-11T13:47:28Z")

</div>

Hey,

that was the missing piece of information. When you use Elastic Cloud, you do not need to configure a dedicated email account, see the [respective documentation](https://www.elastic.co/guide/en/cloud/current/watcher.html#watcher-whitelist).

Hope this helps!

--Alex

---

<div class="post-metadata">

### Author: ![Sudhir\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhir_kumar/32/13080_2.png) [@Sudhir\_Kumar](https://discuss.elastic.co/u/Sudhir_Kumar)
#### Post date: [November 15, 2016, 1:04pm UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/7 "2016-11-15T13:04:55Z")

</div>

Thanks Alex. This worked

---

<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: [December 13, 2016, 1:05pm UTC](https://discuss.elastic.co/t/illegal-user-settings/65610/8 "2016-12-13T13:05:30Z")

</div>

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