0 votes

I am trying to get properties of users through the ADSI api. Some of our attributes in AD are not always filled, for example the employeeID (that gets added after a process is complete). I keep getting the following exception when I come across a user that doesn't have a value for employeeID: "The 'employeeID' property cannot be found in the cache.

I am loading a custom object through a LINQ query, so I can't catch the exception when I search for that property. Is there another method I should be using that returns null if the property doesn't exist (without throwing an exception)?

by (140 points)

1 Answer

0 votes
by (216k points)

Hello,

There is no other method that would return null or whatsoever. If the property is not set for an object, the Get and GetEx methods throw an exception. The best option would probably be to rewrite your code without using LINQ queries, at least that part of the code that deals with accessing Adaxes ADSI API.

Related questions

0 votes
1 answer

Hi, I have a piece of PS code being called by Adaxes and I'm trying to email each AD group member after they are removed from an AD group. Currently I am unable to find ... .LogMessage("User removed: " + " $member", "Information") $emailto = $member.mail ...

asked Jun 2, 2015 by firegoblin (1.6k points)
0 votes
1 answer

I am somewhat new to my adaxes system but have been 'ramping up quickly' ... I noticed a week or so ago that querying my logs suddenly takes a LOT longer than it used to. ... performing that I might not be?? I'd appreciate any thoughts ... Thanks. - Scott W.

asked Aug 6, 2014 by hms.scott (220 points)
0 votes
1 answer

I have a scheduled task that generates several reports and saves them in the filesystem. The task runs only once a day. Is it possible to trigger the scheduled task ... solution to save a report in the filesystem after user creation? Thanks for your help

asked 6 hours ago by lohnag (160 points)
0 votes
1 answer

Is it possible to add a user to a group based on hardware ? There are users with a Windows device and a MacOS device. I want to be able to choose this when ... the user via Adaxes and automatically link them to a specific group based on the chosen hardware.

asked 2 days ago by Cas (150 points)
0 votes
1 answer

Trying to test importing users via CSV. Running into the following error -- Error: The input object cannot be bound to any parameters for the command either because the command does ... in the Powershell script, but no luck -- Here's my scheduled task --

asked Apr 10 by msinger (110 points)
3,346 questions
3,047 answers
7,770 comments
544,967 users