# Authorization Problem

**URL:** https://discuss.elastic.co/t/authorization-problem/89038
**Category:** Elasticsearch
**Created:** [June 12, 2017, 12:22pm UTC](https://discuss.elastic.co/t/authorization-problem/89038 "2017-06-12T12:22:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hfakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hfakar/32/18211_2.png) [@hfakar](https://discuss.elastic.co/u/hfakar)
#### Post date: [June 12, 2017, 12:22pm UTC](https://discuss.elastic.co/t/authorization-problem/89038/1 "2017-06-12T12:22:39Z")

</div>

Isnt there a built in user ("superuser") on active -directory realm?

Why is it giving an error when I give the superuser role to my account?

 ![](https://us1.discourse-cdn.com/elastic/original/3X/9/1/91803180743d2e7034acdbaf2f84cfca35836c3b.png)

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [June 12, 2017, 1:14pm UTC](https://discuss.elastic.co/t/authorization-problem/89038/2 "2017-06-12T13:14:05Z")

</div>

If you are getting that error, then your user does not have the `superuser` role.

You can use the [authenticate API](https://www.elastic.co/guide/en/x-pack/current/security-api-authenticate.html) to check the roles that your user has.

If you provide more details then we can help track down the problem.

---

<div class="post-metadata">

### Author: ![hfakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hfakar/32/18211_2.png) [@hfakar](https://discuss.elastic.co/u/hfakar)
#### Post date: [June 12, 2017, 1:23pm UTC](https://discuss.elastic.co/t/authorization-problem/89038/3 "2017-06-12T13:23:06Z")

</div>

Seems like I dont even have a user. How to I authenticate though.  
 ![](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8e503fac426114deee088b175bf464611735bdb4.png)

I am leaving the roles.yml empty because superuser role is default right? (or did I do the dumbest mistakeby leaving it empty)

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [June 12, 2017, 2:01pm UTC](https://discuss.elastic.co/t/authorization-problem/89038/4 "2017-06-12T14:01:11Z")

</div>

Your original error message referred to the user `h_akar5`, but the authenticate output is for the `elastic` user.

You need to call the authenticate API using your `h_akar5` user if you want to test anything.

If you're using curl, pass `-u h_akar5` as a command line parameter.

---

<div class="post-metadata">

### Author: ![hfakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hfakar/32/18211_2.png) [@hfakar](https://discuss.elastic.co/u/hfakar)
#### Post date: [June 15, 2017, 11:10am UTC](https://discuss.elastic.co/t/authorization-problem/89038/5 "2017-06-15T11:10:25Z")

</div>

The problem was I was doing the role mapping in kibana/x-pack/config instead of elasticsearch/x-pack/config and I had no idea.

So now it works like a charm. On the authorization about document level security we use the query:  
"match\_phrase": {"component":"BİLGİ GÜVENLİĞİ MÜDÜRLÜĞÜ"}  
How do I get the response for like multiple components? I tried:  
"match\_phrase": {"component":"BİLGİ GÜVENLİĞİ MÜDÜRLÜĞÜ" or "ORTAK ÇÖZÜMLER MÜDÜRLÜĞÜ"}

AND  
"match\_phrase": {"component":"BİLGİ GÜVENLİĞİ MÜDÜRLÜĞÜ"},  
"match\_phrase": {"component":"ORTAK ÇÖZÜMLER MÜDÜRLÜĞÜ"}

But no success. How do I make an or statement to get both components in the same dashboard?

---

<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: [July 13, 2017, 11:10am UTC](https://discuss.elastic.co/t/authorization-problem/89038/6 "2017-07-13T11:10:25Z")

</div>

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