I'm currently in a job where I'm an employee of company A (and they're the ones who sign my paycheck) as a Senior Desktop Engineer and they've contracted me out to another company, where I'm a Desk Side Analyst (which is obviously less impressive). What would be the correct way ti put this on a resume?
"Senior Desktop Engineer for Company A" all the way:
Company A is the one who pays you, including for all work that you do for company B.
Any prospective employer who wants to perform a dates of employment check will have to contact A. A has your dates of employment not B. You need not mention anything about B, unless it's to your advantage: if A is a no-name employer and they contracted you out to Google, it's to your advantage to mention that you were contracted out to Google and that you have references from Google. I once worked for a no-name contractor who deployed me to AT&T. The poor contractor barely got a fleeting mention on my resume.
A would not have deployed you at B, if you weren't good enough to be a Senior Desktop Engineer at A. When I review resumes, I don't get hung up on titles. On the other hand, I am much more interested in what you actually did and what you can do for me.
It depends somewhat on your relationship with company A. If company A is basically what I call a "body shop" - a way for company B to avoid having to deal with independent contractors - I'd describe myself as working for company B.
If on the other hand company A is a services organization, and you get sent from one company B to another, with your tasks assigned by managers from company A, then it makes more sense to describe company A as your employer.
As for the title - if you work for a company with non-standard titles, or extremely broad vague ones, it may make sense to use an accurate 1-3 word role description as the "title" on your resume. Your goal is for the reader to understand what you were doing.