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

We have a series of transforms we use for users including moving to different OU's. Is there a way to open the user's object after the command completes much in the same way a user creation does?

asked 1 day ago by msheppard (470 points)
0 votes
1 answer

Just wanted to know if we could: Change the name of "Rename" Hide it altogether from the user page We've created a custom rename comand would prefer to simplify the user interface.

asked 1 day ago by msheppard (470 points)
0 votes
1 answer

I see the script for generating a report of users enrolled, but what I'd like to do is run a script that can populate a user attribute with Yes/No or True/False if they are or are not enrolled. Is there an existing script that accomplishes this? Thanks

asked 4 days ago by msheppard (470 points)
3,548 questions
3,239 answers
8,232 comments
547,814 users