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
0 answers

I'm lost as to why "Create User" doesn't show up. I made a new dashboard, mirroring the default Help Desk. Under Actions, I enabled Create User. On the web interface, the option to create a user is not showing. Am I missing a step?

asked 1 minute ago by tromanko (200 points)
0 votes
1 answer

Good afternoon, Is there a script for adding a user to an already existing Office 365 Shared Mailbox? I want to add this script onto the onboarding rules I have added already.

asked May 7 by ocanizales (60 points)
0 votes
1 answer

Hello I try to create a form that lets HR create a user themself, but they need the approval from the IT-Department, so the IT-Department can check the new employees personal data and configure their pc. Or do you have an alternative idea for this process?

asked May 2 by Baul (110 points)
3,367 questions
3,065 answers
7,815 comments
545,316 users