Directory Manager API

Hi, has anyone made experience with the API implementation? We try to get user information via API call but it always ends in error: 404 - File or directory not found. The documentation doesn#t clearly state what attribute is needed for {useridentity}. We assume its the objectguid in Active Directory?

https://machinename:4443/GroupIDDataService/api/IdentityStores/{identityStoreId}/Users/{userIdentity}

Thanks a lot!!!

Best regards, Vasco

Indeed. The identity of the object is the ObjectGUID in case of API.

3 Likes

Hello Qasim,
thanks for the clearification!! The next question would be, why it fails with “File or directory not found” when we make the call.
We try it like this:
…/GroupIDDataService/api/IdentityStores/2/Users/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
Where 2 is our IdentityStoreID and aaaaa… is the objectguid from our AD.

Any thoughts are appreciated!

Best regards, Vasco

Hello Vasco,

I am assuming that you were able to generate a bearer token first as well as confirmed that it is not expired. Moreover, can you please confirm the following:

  • Which version of GroupID are you currently on?
  • Are you using GET method to execute this call?

Syntax that you shared is correct, so I would like to know the other details that are related to this API Call.

Hoping to hear back from you.

1 Like

Hello Quasim,
sorry for the late reply, work got in my way :smiley:

We are on Version 11.1.25134.03

We are using Postman to accomplish this, here we can authenticate as documented and receive a bearer token from the api. We use this in Postman to authenticate and use a get method to receive the described information.

After your last post I tried to authenticate with garbage in the bearer token authentication and the result was the same. So I’m currently suspecting that postman is not correctly delivering the bearer token. I’ll try other ways to deliver the token and post my progress here.

Best regards, Vasco

Hello Vasco,

Thank you so much for the update. Just make sure that the command should be sent as GET method. My tests are also using Postman and it works for me.

I’ll look forward to your update and we’ll work accordingly. Have a wonderful day.

Hi Qasim,

we made sure we use a get request but it doesn’t work.
We have the following setup:

We sucessfully post https://Server:4443/GroupIDSecurityService/connect/token with username and password of a read only user (from AD) to get a token. Here we get delivered the access_token which we then use in our get request:

https://Server:4443/GroupIDDataService/api/IdentityStores/2/Users/

under authorization we add the received access_token as Auth Type: Bearer Token for the value token.

In body we ask for the reuired information like:

{
  "identityStoreID": 2,
  "objectIdentities": [
    "f27ddee4-4ea6-4391-as40-279asda36941"
  ],
  "addAndResolveAdditionalDirectReports": true,
  "attributesToLoad": [
    "displayName",
    "department"
  ]
}

But when we send this get request we receiver “404 not found” and the following body:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>
<style type="text/css">
<!--

body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>404 - File or directory not found.</h2>
<h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
</fieldset></div>
</div>
</body>
</html>

I assume that we are not gettin authorized as we can change the token to anything and still get the same output.

Or there is an error somwhere in our request?

Thanks fro your help and have a nice weekend everybody.

Best regards, Vasco

1 Like

Hello Vasco,

Hope you’re doing well.

Thank you so much for the detailed response. It does not appear to be authorization issue as it would give you a “401-Unauthorized” error.

Allow me to review this and I will get back to you shortly. This appears to be a server error that it is trying to communicate with. However, I would like to do some testing at my end regarding this.

Appreciate your patience in the meantime.

Thanks,
Qasim

1 Like