What is the easiest way to associate an utxo to a specific account? I'm building a web application that uses bitcoind's accounts to track user balances. My dev env is currently in regtest mode. I am working on calculating the network transaction fee prior to creating a raw transaction. 

When I listunspent to bitcoind over JSON-RPC, I get a multidim array that includes txid, address, and scriptPubKey (amongst other things). How can I use this information to determine which account these utxo's are tied to? I thought I'd be able to use getaccount with the returned corresponding addresses, but I'm returned an empty string. Is that because the transaction originated from the wallet 'global' account? Is that something to do with regression testing mode?

I also tried listtransactions for the specific account to match txid, but didn't have txid's because they were moves. Even if I could do this for network transactions, how would I handle utxo's that were resulting from a move?

I can getbalance for different accounts and see the correct resulting balances from using the move command. I'm beginning to question a few things so I'm not sure where I have an problem or if I'm going about this the wrong way. Ultimately, my goal is to be able to calculate tx fee so the user can approve them before sending...keeping in mind single wallet with each user having their own account.

Thanks for the help! ...it's late and my head hurts lol
The long and short of it is that you can't associate UTXOs with accounts, you can only associate addresses. From the bitcoin wiki accounts page:


  When you receive bitcoins, they are always assigned to one of your accounts, and you can change which account is credited based on which bitcoin address receives the coins, just like you tell a bank teller which account to credit when you deposit cash in your bank. However, sending bitcoins is like withdrawing cash from the bank; the coins that are sent out and debited from an account are almost always not the same coins that were deposited into that account.


If you haven't already, you should see this post about why the accounts portion of the tab isn't really scalable. 


  I thought I'd be able to use getaccount with the returned corresponding addresses, but I'm returned an empty string. Is that because the transaction originated from the wallet 'global' account?


Yes, that is exactly, why. The default account is named "". 

So, you can associate UTXOs with accounts through associating addresses with accounts, but when spending, there's no guarantee about where you're spending from.

As a possible work around, you might look at using this rpc call:

listreceivedbyaddress ( minconf includeempty )