I need to get the relevant userId of the given ethAddress by using Moralis cloud functions.
you can use a normal query with master key parameter in a cloud function