 The Office employs an ensemble cast . Most of the main characters , and some minor ones , are based on characters from the British version of The Office . While these characters normally have the same attitudes and perceptions as their British counterparts , the roles have been redesigned to better fit the American show . The show is known for its large cast size , many of whom are known particularly for their improvisational work . Rainn Wilson portrays Dwight Schrute , who , based upon Gareth Keenan , is the Assistant to the Regional Manager , although the character frequently fails to include " to the " in his title . John Krasinski portrays Jim Halpert , a sales representative and prankster , who is based upon Tim Canterbury , and is married to Pam Halpert , the office administrator . Pam ( Jenna Fischer ) , who is based on Dawn Tinsley , is shy , but is often a cohort with Jim in his pranks on Dwight . Ed Helms plays Andy Bernard , the preppy manager — who was previously a salesman — and boastful Cornell alumnus whose love for a cappella music and awkward social skills generates mixed feelings from his employees . 
