Please see http://blogs.msdn.com/bharry/archive/2007/04/17/configuring-tfs-to-use-sharepoint-2007.aspx