Search query for mandatory attribute

Hi,

I am trying to fetch the incomplete identity details using search query(condition is , uid is null or email is null or lastname is null) I am not getting expected result when I try with this query “((appType eq ‘identity’) AND (uid is null OR lastname is null OR email is null))”

It is fetching all the identities. Total identity shown in my system for “incomplete identites” is 70. Can anyone help me here?

Thanks

Hi @harishhaleon,

Have you tried something like this.?

(NOT _exists_:attributes.lastname) OR (NOT _exists_:attributes.email) OR (NOT _exists_:attributes.uid)
2 Likes

I believe this search query might be of use:

NOT attributes.email:* OR NOT attributes.lastname:* OR NOT attributes.uid:*

Hi @harishhaleon,

Kindly check the documentation on building search query:

You can use exists keaword for getting list of identities with specific requirements.

I have tried all these which is given below but query is not returning expected identity details @bhushan008 @jesvin90 @sauvee

(NOT_exists_:attributes.lastname) OR (NOT_exists_:attributes.email) OR (NOT_exists_:attributes.uid)

((appType eq ‘identity’) AND ((NOT exists:attributes.lastname) OR (NOT exists:attributes.email) OR (NOT exists:attributes.uid)))

(appType eq ‘identity’ AND (firstName eq null OR lastName eq null OR displayName eq null OR email eq null))

((appType eq ‘identity’) AND (uid is null OR lastname is null OR email is null))

Thanks

You seem to have missed a space after NOT ?

This is the correct format :

(NOT _exists_:attributes.lastname) OR (NOT _exists_:attributes.email) OR (NOT _exists_:attributes.uid)

Hi @jesvin90 - Yes, I have pasted without space here but tried with space,still not working. Actually, your solution should work, but not sure what is wrong!

Hi Harish,

I don’t think we can get this information using the search queries, since those are all mandatory attributes for an Identity. Those Identities will not be properly promoted unless those issues are resolved. You can get the error report from the Identity Profile mapping itself.

Thanks

2 Likes

Hi @harishhaleon,

I tested this out in my tenant and the behavior looks the same as you are seeing. And the users with missing emails does not even show up in any search results.

I would be curious to know if this was something that used to work earlier as the documentation suggests using NOT _exists_ for finding users with missing email.

And as @Karthikeyan_U suggested, using the Identity exception report seems to be a viable option.

@jesvin90 - Please let me know if you have any findings!

Thanks,
Harish G

Thanks @Karthikeyan_U

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.