# Unable to create short URL. Error: Internal Server Error

**URL:** https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919
**Category:** Kibana
**Created:** [January 27, 2019, 10:01pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919 "2019-01-27T22:01:13Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)
#### Post date: [January 27, 2019, 10:01pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/1 "2019-01-27T22:01:13Z")

</div>

Hello World!

Kibana' user is reporting following issue:

frontend:

> Unable to create short URL. Error: Internal Server Error

backend:

`kibana-custom | {"type":"error","@timestamp":"2019-01-27T21:51:25Z","tags":[],"pid":1,"level":"error","error":{"message":"Unable to create url, missing action:saved_objects/url/create","name":"Error","stack":"Error: Unable to create url, missing action:saved_objects/url/create\n at SecureSavedObjectsClientWrapper._ensureAuthorized (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/saved_objects_client/secure_saved_objects_client_wrapper.js:136:48)\n at <anonymous>"},"url":{"protocol":null,"slashes":null,"auth":null,"host":null,"port":null,"hostname":null,"hash":null,"search":"","query":{},"pathname":"/api/shorten_url","path":"/api/shorten_url","href":"/api/shorten_url"},"message":"Unable to create url, missing action:saved_objects/url/create"}`

Per [Sharing a Dashboard | Kibana User Guide [6.5] | Elastic](https://www.elastic.co/guide/en/kibana/current/sharing-dashboards.html):

> To create a short URL, you must have write access to Kibana.

what exactly is `write access`? user has `kibana_user` role assigned, is that not enough?

Please advise.

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [January 28, 2019, 1:14pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/2 "2019-01-28T13:14:47Z")

</div>

@alexus,

The `kibana_user` role should be sufficient. Can you verify they actually have that role assigned?

Which version of Kibana & Elasticsearch are you using? Can you post your `kibana.yml` configuration, omitting any usernames/passwords/secrets?

---

<div class="post-metadata">

### Author: ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)
#### Post date: [January 28, 2019, 2:53pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/3 "2019-01-28T14:53:51Z")

</div>

if `kibana_user` role wouldn't be assigned, user wouldn't be able to access Discover either (which is not the case)

Elastic stack runs latest 6.5.4, in regards to configuration: I used [Running Kibana on Docker | Kibana User Guide [6.5] | Elastic](https://www.elastic.co/guide/en/kibana/current/docker.html) with few minor adjustments (ssl certificate, etc.).

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [January 28, 2019, 3:39pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/4 "2019-01-28T15:39:37Z")

</div>

> if `kibana_user` role wouldn't be assigned, user wouldn't be able to access Discover either (which is not the case)

That's not necessarily true. You can create custom roles to access Kibana, or use the built-in `kibana_dashboard_only_mode` role to grant read-only access as well (even if you don't use the Dashboard Only Mode feature).

Is this user able to create any saved searches, dashboards, or index patterns within Kibana? Or is it just short urls that are failing?

---

<div class="post-metadata">

### Author: ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)
#### Post date: [January 28, 2019, 4:12pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/5 "2019-01-28T16:12:17Z")

</div>

correct, user is able to do everything as defined within shipped `kibana_user` role, except for creating short URL.

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [January 28, 2019, 5:27pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/6 "2019-01-28T17:27:13Z")

</div>

Can you execute the following in DevTools, and post the result? Replace `<username>` with the username of the account. Omit personal information such as `full_name` and `email`:

```auto
GET /_xpack/security/user/<username>

```

For example, `GET /_xpack/security/user/larry` for my own setup returns the following:

```auto
{
  "larry" : {
    "username" : "larry",
    "roles" : [
      "superuser"
    ],
    "full_name" : "......",
    "email" : "......",
    "metadata" : { },
    "enabled" : true
  }
}

```

---

<div class="post-metadata">

### Author: ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)
#### Post date: [January 28, 2019, 5:46pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/7 "2019-01-28T17:46:33Z")

</div>

Per your request:

```
{
  "userX" : {
    "username" : "userX",
    "roles" : [
      "roleX",
      "roleY",
      "roleZ"
    ],
    "full_name" : "x x",
    "email" : "x@x.x",
    "metadata" : { },
    "enabled" : true
  }
}

```

after reviewing user's role it is worth to mention: due to `userX` using own space, `userX` doesn't have `kibana_user` role assigned, as `userX` limited to one specific space only and assigning `kibana_user` role to `userX` allows `userX` to see other spaces, rest of roles are related to access to custom indices.

and lastly, `userY` (which has same roles assigned as `userX`) doesn't have an issues with creating short URL (within very same space as `userX` does).

I've tried restarting Kibana, but still no luck( `userX` still has issue while `userY` doesnt.

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [January 28, 2019, 5:54pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/8 "2019-01-28T17:54:56Z")

</div>

Redacting _everything_ isn't all that helpful, but it's good to know you're in fact not using the `kibana_user` role.

Can you please post the actual role definitions for "roleX", "roleY", and "roleZ"?  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html)

I suspect that the roles are granting "read" access to a particular space, rather than "all" access to a particular space.

---

<div class="post-metadata">

### Author: ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)
#### Post date: [January 28, 2019, 6:07pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/9 "2019-01-28T18:07:43Z")

</div>

I apologize for that, just trying to be as accurate as possible)

After further investigation, your suspicion is right on the money as `userX` has `read` Privilege, while `userY` has `all` Privilege.

Maybe Kibana could use some improvements in displaying errors, say in more useful way?) Regardless, thank you very much for your help! I appreciate it!

---

<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: [February 25, 2019, 6:07pm UTC](https://discuss.elastic.co/t/unable-to-create-short-url-error-internal-server-error/165919/10 "2019-02-25T18:07:45Z")

</div>

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