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 are using the below snippet to grab the email of a single custom attribute object. Can I get guidance on the best way to modify this to get all the emails of each ... "The user specified in parameter 'MyParameter' has no email address. ", "Information") }

asked 4 days ago by msheppard (660 points)
0 votes
1 answer

Looking for a script (unless there is a built in way, which I don't think there is) to grant User A full access to User B's OneDrive

asked Dec 16 by msheppard (660 points)
0 votes
1 answer

In this case the working example would be that the user would need to add a new title into a list of titles in the title property pattern

asked Dec 13 by msheppard (660 points)
3,589 questions
3,278 answers
8,303 comments
548,153 users