0 votes

Quick question

we may have the need to pull directly from Adaxes some custom attributes, are they available for other systems via an API call?

by (3.2k points)

1 Answer

0 votes
by (18.0k points)
selected by
Best answer

Hello,

Yes, here is a PowerShell example:

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

$user = $admService.OpenObject("Adaxes://CN=John Smith,CN=Users,DC=company,DC=com", $NULL, $NULL, 0)
$customAttributeValue = $user.Get("adm-CustomAttributeText1")

C#:

using Softerra.Adaxes.Interop.Adsi;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;
class Program
{
    static void Main(string[] args)
    {
        AdmNamespace adsNS = new AdmNamespace();
        IAdmService admService = adsNS.GetServiceDirectly("localhost");

        IADs user = (IADs)admService.OpenObject(
            "Adaxes://CN=John Smith,CN=Users,DC=company,DC=com", null, null, 0);
        string customAttributeValue = (string)user.Get("adm-CustomAttributeText1");
    }
}

Adaxes also provides XML API based on the SPML protocol.

For details, see http://adaxes.com/sdk/.

Related questions

0 votes
1 answer

We are creating a scheduled task with powershell script to check for group licensing errors in Azure/Entra ID using Graph API but the connection throws an error. `# Connect to Graph ... ($count -le 0) { write-host "No user found with license errors" }`

asked Jan 26 by maarten.vaes (70 points)
0 votes
1 answer

Hello, We recently applied the 2023 upgrade following the backup / uninstall / install / restore procedure and we faced an issue: UUIDs for Business Units changed, which ... upgrade Adaxes in the future that does not delete and recreate Business Units? Cheers

asked May 4, 2023 by ygini (240 points)
0 votes
1 answer

what its trying to do? GET, POST..etc...?

asked Apr 6, 2023 by scotthoffman (20 points)
0 votes
1 answer

We are getting this error on restapi when connecting. What could be causing this? We recently had to do a complete reinstall from a configuration backup due to a ... decrypt an authentication token. The decryption key is missing.','code':'unauthenticated'}'

asked Jan 31, 2023 by mark.it.admin (2.3k points)
0 votes
1 answer

#!/bin/python3 import requests import json baseUrl = "https://xxxxxxxxxx/restApi" endpoint = "/api/authSessions/create" # Request parameters requestUrl = baseUrl + endpoint ... either expired or invalid.', 'code': 'unauthenticated'} Could you please suggesst

asked Dec 26, 2022 by udathakarthic (40 points)
3,347 questions
3,048 answers
7,788 comments
545,045 users