How to display Exchange Server 2007 public folders via SharePoint

Using a custom block of code, these instructions and some Web parts, you can display Exchange Server 2007 public folder content in Microsoft SharePoint.

This Content Component encountered an error

Accessing public folder data through Microsoft SharePoint can be troublesome, and one of the biggest problems is authentication. When a SharePoint site attempts to access public folder data, it pulls it from Exchange Server without first authenticating. Because SharePoint is Web-based, the best method to make the authentication process work is to let Outlook -- not Outlook Web Access -- handle it .

Outlook 2007 is extensible, and there are numerous third-party products that plug into Outlook to access Exchange data. This method uses the same concept to make public folder data accessible through SharePoint. However, it does introduce a major limitation. The process won't work unless the user has Outlook installed and configured to access his mailbox.

When researching solutions to this authentication issue, I found several blocks of code that use Microsoft Outlook as a mechanism for retrieving public folder data. Ultimately, I couldn't get any of them to work as they were presented; however, this modified code works well.

Copy the following code into Notepad and save it using the filename pf.htm. I also recommend saving the file in your SharePoint site's working folder. Alternately, you can save the page to your OWA site. However, because OWA 2007 uses SSL encryption, you'll receive error messages when the page is accessed and the Outlook data will be treated as an insecure item.

Here is the modified code that you will need to access public folder data:

<object classid=clsid:0006F063-0000-0000-C000-000000000046
<param name="Namespace" value="MAPI">
<param name="Folder" value="\\Public Folders\All Public
Folders\Folder 1">
<param name="Restriction" value="">
<param name="DeferUpdate" value="0">

When bringing SharePoint into the picture, there is no way to access the full public folder tree, you can only access individual folders. The following line of code controls which public folder is displayed:

<param name="Folder" value="\\Public Folders\All Public Folders\Folder 1">

This code will display a folder named Folder 1. Change Folder 1 to the name of a folder in your own public folder tree. If you're trying to display a subfolder, you'll need to include the full public folder path rather than just the name of the target folder.

To display multiple folders, duplicate the block of code as many times as you need to and reference a different public folder within each block. All of your blocks of code can exist within the same pf.htm file.

After you create your code, upload it to your SharePoint site and enter the file's URL into your Web browser. The resulting Web page should look something like Figure 1.

An example of a pf.htm file in SharePoint
Figure 1. This is what the pf.htm file looks like when you directly access it.

Next, open the SharePoint site that will access public folders. Choose the Edit Page option from the Site Actions menu. The SharePoint site will provide you with different locations that you can click on to add a Web part (Figure 2). Click on an Add a Web Part link.

SharePoint gives several links you can use to add a Web part.
Figure 2. SharePoint gives you different links that you can use to add a Web part.

SharePoint will display some commonly used Web parts; however, the type that you're going to need isn't included on this list. Expand theAll Web Parts container to see SharePoint's Web part collection according to category.

SharePoint has some built-in OWA Web parts, but there is no Web part for public folder access. You should select the Page Viewer Web part, which is located in the Miscellaneous section.

Click on Add to add the Web part to your page. The Web part contains a message that you need to open the tool pane and then type the URL in the Link text box (Figure 3).

Click the link to customize your SharePoint Web part
Figure 3. Click on the link to customize the Web part.

Select the Open the Tool Pane link to view options for the Page Viewer Web part in a pane on the right. Then instruct SharePoint where to display the Web page and enter the page's URL (Figure 4). Enter the URL that corresponds to the pf.htm file that you created earlier. Finally, click OK to save your changes.

Enter your URL in the pf.htm file
Figure 4. Enter the URL to your pf.htm file into the space provided.

When you return to your main SharePoint page, you'll see the public folder content (Figure 5).

SharePoint now displays your public folder content
Figure 5. SharePoint displays your public folder content.

Final customizations

Although this technique works well, there is one minor issue. If you look at Figure 5, you'll notice that SharePoint does not give the name of the public folder it is displaying. Instead, it shows some generic text that reads: Page Viewer Web part.

To modify this so that SharePoint displays the name of the public folder you're viewing, choose the Edit Page option from SharePoint's Site Actions menu. Next, choose the Modify Shared Web Part command from the Page View Web part's Edit menu.

SharePoint will display the same set of options that you saw when you first set up the Web part. Expland the Appearance container to can change the Web part's title so that it matches the name of the public folder that is being displayed (Figure 6).

Change the name of the SharePoin Web part that that it matches the public folder
Figure 6. Change the name of the SharePoint Web part so that it matches the name of the public folder.

About the author: Brien M. Posey, MCSE, is a five-time recipient of Microsoft's Most Valuable Professional (MVP) award for his work with Exchange Server, Windows Server, Internet Information Services (IIS), and File Systems and Storage. Brien has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal website at

Do you have comments on this tip?  Let us know.

Do you know a helpful Exchange Server, Microsoft Outlook or SharePoint tip, timesaver or workaround? Email the editors to talk about writing for

This was first published in January 2010
This Content Component encountered an error



Enjoy the benefits of Pro+ membership, learn more and join.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: