This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.
When searching in a SmartForm Picker Control against an Azure Active Directory SmartObject, the expected results are not returned.
When performing a search in the Picker Control for a user that does not fall within the first 200 records within Azure Active Directory, no results are found.
When executing the same Azure Active Directory SmartObject using the SmartObject Service Tester (for K2 Blackpearl) or K2 Management Page (for K2 Appit), the expected results are returned even if the user falls outside the first 200 records.
The cause of the issue is a result limit imposed by the Microsoft Azure Active Directory Graph API that is used to query AAD.
The reason it occurs is in the way the Picker Control queries the data to find the text specified. The API only returns the first 200 results so this is all that is available to search against in the Control.
The internal function is also designed differently when compared to executing the SmartObject from the SmartObject Service Tester or Management Page. This is why executing the SmartObject directly will return a result, but the Picker Control will not.
A possible workaround is to use the User Role Manager Service - URM Service – User SmartObject instead. This will query the K2 User Cache which will in turn query AAD.
1)Add this SMO in the lookup control and note it needs input value for Label, i.e. "AAD".
2)In the control properties there is a “Result Limit”. This can be used to specify the GetList result limit. If this is large it will impact performance of the control
3)On the DataSouce filter properties for the control, try and keep the fields to a minimum, the more fields the worst the performance will be.