This functions single responsibility is to get the user id associated with a domain name. Unfortunately in this system that is, apparently, not a simple task. Having a single responsibility doesn't mean the task is simple. It means the task is focused. It should only ever have one reason to change.
My biggest problem with this code is right here:
message = "Failed to get user by badge number: " + domainName;
There are 3 other ways to get a null user and end up here, yet this log message always blames the badge number. If I was trying to debug this you wouldn't want me knowing where you live.
That is a traceability problem. Not a single responsibility problem. Where this might be a single responsibility problem is if eliminating users based on badgeNumber isn't needed to weed down to one result. As if you were only doing it as some crazy kind of integrity check. That would be a pointless extra responsibility. I mean, what happens if AsmUser.AsmUserHandler.GetBadgeNumber(domainName) decides it wants to be sure the domainName produces a user with a userId? That will just run you in circles. No only. Only make badgeNumbers part of getting a userId if you really need it to get down to one userId. Do youyour integrity checks separately.
And Euphoric has a point about returning 0. This looks like C# code. Any reason you're not throwing exceptions?