# Icinga Director REST API - API users not working

**URL:** <https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198>\
**Category:** Icinga Director\
**Created:** [January 14, 2020, 9:03am UTC](https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198 "2020-01-14T09:03:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaber](https://community.icinga.com/user_avatar/community.icinga.com/jaber/32/1798_2.png) [@jaber](https://community.icinga.com/u/jaber)\
**Post date:** [January 14, 2020, 9:03am UTC](https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198/1 "2020-01-14T09:03:38Z")

</div>

Hi,  
in my environment icinga Director master is working properly and I have tested successfully with my user credentials multiple REST methods explained here  
[https://icinga.com/docs/director/latest/doc/70-REST-API/](https://icinga.com/docs/director/latest/doc/70-REST-API/)

My issue now, -and please forgive my ignorance as I am new to this world- I have created a user named test with a basic password in the section \>Icinga director\> Icinga Api Users  
as you see here

 ![IcingaUser](https://community.icinga.com/uploads/default/original/2X/3/3105b41eb125584d8dd4194435b2949424b4cb1d.jpeg)

I am testing the API calls with the new created user credentials but they are not working successfully! also curl is not showing me any error results or any clue!  
Any Idea or help would be very much appreciated.  
Thanks  
Jaber

---

<div class="post-metadata">

**Author:** ![lukas](https://community.icinga.com/letter_avatar_proxy/v4/letter/l/e9a140/32.png) [@lukas](https://community.icinga.com/u/lukas)\
**Post date:** [January 14, 2020, 11:13am UTC](https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198/2 "2020-01-14T11:13:17Z")

</div>

Hey Jaber,

maybe this can help? Add the user to a role with the needed permissions.

Source:

> [@Get information via Poweshell and Icinga Director API](https://community.icinga.com/t/get-information-via-poweshell-and-icinga-director-api/3141/8):
>
> Thanks for your help, that’s what it was. Solution: I created a user under IcingaWeb2 → configuration → authentication → user → "Create new user After that I created a new role under IcingaWeb2 → configuration → authentication → Rollen→ “Create new role” and in the module “director” I added the rights “General Module Access” and “director/\*”. I added the user “user” to the role. This gave me a correctly configured user for working with the Icinga Director API. Then I wrote a script that cr…

---

<div class="post-metadata">

**Author:** ![jaber](https://community.icinga.com/user_avatar/community.icinga.com/jaber/32/1798_2.png) [@jaber](https://community.icinga.com/u/jaber)\
**Post date:** [January 20, 2020, 2:45pm UTC](https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198/3 "2020-01-20T14:45:25Z")

</div>

Hallo Lukas and thanks for your reply,  
Bad news is, I can not follow the given solution because I don’t have the possibility to create new user! I n another word, I don’t have the create Option or any option appearing on my screen!

 ![username](https://community.icinga.com/uploads/default/original/2X/7/7560db573dab0d28d89f11cfbad7e1a908e0a60d.jpeg)

interesting is that I have the option to create a Role but no option to crearte a user!

 ![role](https://community.icinga.com/uploads/default/original/2X/7/7a6a0cf5d906ccde86d497c58d16a6d643ca893d.jpeg)

by the way, the user I am user is member of Administrators group.  
I hope some one could advice in this regards.  
Thanks  
Jaber

---

<div class="post-metadata">

**Author:** ![lukas](https://community.icinga.com/letter_avatar_proxy/v4/letter/l/e9a140/32.png) [@lukas](https://community.icinga.com/u/lukas)\
**Post date:** [January 20, 2020, 3:04pm UTC](https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198/4 "2020-01-20T15:04:03Z")

</div>

> [@jaber](#):
>
> Bad news is, I can not follow the given solution because I don’t have the possibility to create new user! I n another word, I don’t have the create Option or any option appearing on my screen

Hey Jaber,

do u have multiple user backends? Try to change it to “icingaweb2” or another non-AD Backend. Than the botton appears.

 ![grafik](https://community.icinga.com/uploads/default/original/2X/6/648f83b3d75add66a1584833b4392c0bad1499ff.png)

---

<div class="post-metadata">

**Author:** ![unic](https://community.icinga.com/user_avatar/community.icinga.com/unic/32/200_2.png) [@unic](https://community.icinga.com/u/unic)\
**Post date:** [January 21, 2020, 1:33pm UTC](https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198/5 "2020-01-21T13:33:30Z")

</div>

**Director Api and Icinga Api are different things.**  
-If you want to add host with the Director Api you need to use an icingaweb2 user with director Api permissions and not an Icinga Api user. If you want to do something with the Icinga2 Api, the icinga Api user is enough.

-You can’t add users because you are ldap authenticated. Just create a role, that have director api permissions and add LDAP users to this group. You simply can type in a name of an existing ldap user, or select them, if ldap is correctly configured.

To create users you need another authentication method, like mysql database where these “local” users are stored like @lukas mentioned.

---

<div class="post-metadata">

**Author:** ![jaber](https://community.icinga.com/user_avatar/community.icinga.com/jaber/32/1798_2.png) [@jaber](https://community.icinga.com/u/jaber)\
**Post date:** [January 21, 2020, 4:16pm UTC](https://community.icinga.com/t/icinga-director-rest-api-api-users-not-working/3198/6 "2020-01-21T16:16:25Z")

</div>

> [@unic](#):
>
> You can’t add users because you are ldap authenticated. **Just create a role, that have director api permissions and add LDAP users to this group.** You simply can type in a name of an existing ldap user, or select them, if ldap is correctly configured.

exactly how I solved the issue, by creating a role and adding an LDAP user to a group.  
Thanks very much for Lukas and Rafael : )  
cheers!  
Jaber
