Looking at the error, I see that a token was acquired successfully by the Query Task. But it was rejected by the server when the token was used to invoke a Query operation.
Could you double check that the service the Query task is using permits access to user123?