Skip to main content

Hi, I have the requirement to search users/participants by Department using a picker control bound to  the Azure Active Directory User Smart Object.

Some departments do have special characters in ('&, +, -, _,'), and I get error when seaching for these.

What do I need to change to get this query to return results?

 

What is the error message?  What does your filter look like?


Hi @DavidL2 ,



I am trying to filter for users in the Department 'Automation & Integration' and tried the following:





  • If I execute the Azure Active Directory -> User -> Get List via management, it returns all results.


  • If I filter for a department by adding 'Automation', 'Automation*' or 'Automation%' in the Department Field, I get not result


  • If I filter for a department by adding 'Automation &' in the Department Field, I get an error result




 



Any Pointers ?


I don't have an access to an environment where I can test this scenario, but I do have a couple of ideas for you.



1. Instead of using the ActiveDirectory SmartObject, instead switch to the UMGroup SmartObject.  The SmartObjects that start with 'UM' stand for User Management.  They can pull users and groups from any configured security label (some systems have more than one).  These SmartObjects return data from a SQL cache of users and groups instead of going to the directory provider.  They are much faster than going to ActiveDirectory directly, especially if you have a lot of users and groups.  The UM SmartObjects should take the  wildcards you are expecting.  The UM* SmartObjects have a required field called 'Label'.  This is the label of your directory providers and will probably be 'K2' for Active Directory or 'AAD' for Azure Active Directory.  You can look up the security labels registered on your system using the UMLabel SmartObject.





2. Instead of using the picker control, try using the lookup control which will give you more flexibility.  When using the lookup control, you will create your own list view to display items a user can pick.  When you design the list view, you can include the search options.  If you don't use the standard search fields, you could create your own search box and then use that value in the filter section of the SmartObject rule rather than passing it as an input.  The filter part of the rule filters the results after the service broker gets the initial results from the data store whereas the input properties are passed directly to the broker which may or may not understand wild cards.



 


Reply