Hello everyone,
I would have to write an expression that filters active users. Additionally, the user type should be "Guest" or have a specific name in the domain.
I can't get the "or" statement, including the active user expression
Currently my expression looks like this. Unfortunately, either guestuser or with the specific domain are output, but not both together. I have tried different expression configurations, the current one is wrong but it works
and(
equals(item()?['AccountEnabled'],true),
equals(item()?['UserType'], 'Guest'),
not(endswith(item()?['UserPrincipalName'], '@example.com'))
)
i also try this one:
and(
equals(item()?['AccountEnabled'],true),
endswith(item()?['UserPrincipalName'], '@example')
)
or(
equals(item()?['AccountEnabled'],true),
equals(item()?['UserType'], 'guest')
)
or this:
equals(item(?['AccountEnabled'], true)) and (endswith(item()?['UserPrincipalName'], '@example')), or (equals(item()?['UserType'], 'Guest'))
About Help I would be happy
Regards
Hi all,
Found an error, it was my fault. The value "UserType" was missing in the Http request... so it couldn't be read. Seems to be working now
thank you guys
Regards
Hi @Shravan,
thank you for your replay.
Unfortunately the same issue. Either guest user or with a specific domain, but not both.
Regards
Hi,
Try This :
and(
equals(item()?['AccountEnabled'], true),
or(
equals(item()?['UserType'], 'Guest'),
endswith(item()?['UserPrincipalName'], '@example.com')
)
)