Compartilhar via


Detecting Sharepoint PSTs

We had a customer recently who was asking how to tell a PST had been configured as a Sharepoint PST, so they could exclude it from some processing they were doing. After some digging, I found the property that Outlook itself uses to determine a PST is a Sharepoint PST, and development gave me permission to document it:

 #define PR_ASSOCIATED_SHARING_PROVIDER PROP_TAG(PT_CLSID, 0x0EA0)

To check if a PST is a Sharepoint PST, mount the PST using OpenMsgStore, then call GetProps on the message store object requesting this property. If it exists, you can assume the PST has been configured for Sharepoint. If it doesn’t exist, the PST has not been configured as a Sharepoint PST.

Comments

  • Anonymous
    January 13, 2010
    Could you also compare the returned PR_MDB_PROVIDER property value to the one identifying a SharePoint PST? I was under the impression this property would be the same for all instances of that store type (e.g. Wrapped PST, standard PST, Live Connector, Exchange Store, etc...)

  • Anonymous
    April 13, 2010
    I tried 0x0EA0, but not getting the value in proper format, so this one is not working out for me. I tried PR_MDB_PROVIDER, but this property failed for some PSTs in outlook 2003.(Works fine with outlook 2007) Finally i took 0x0E38 an un named property whose value is always 3 for sharepoint PST, for normal PSTs this property can not be found(I'd to consume the exception ;)). Till now this one is working out for me. If any other property is is there Keep Posting pls.

  • Anonymous
    April 13, 2010
    What do you mean by "proper format"? Are you getting back an error, or just a data type you don't know how to parse?

  • Anonymous
    April 13, 2010
    I am getting mostly "null" while getting the value from 0x0EA0.

  • Anonymous
    April 14, 2010
    Which member of the union are you looking at?

  • Anonymous
    April 14, 2010
    Union??? I am using the below code to get the property value in to an object object obj = rfolder.get_Fields("http://schemas.microsoft.com/mapi/proptag/0x0E380003"); where rfolder is RDOStore object.

  • Anonymous
    April 14, 2010
    Ah - you never said you were using the object model. I don't know if the object model can handle a CLSID. The intention here was to access the property using MAPI.

  • Anonymous
    April 14, 2010
    So I think, I can say that for object model I can use the above property(0x0E38) for detecting Sharepoint PSTs?

  • Anonymous
    April 14, 2010
    That property is PidTagReplFlags, documented in [MS-PST]. I wouldn't assume that a value of 3 can only be set on Sharepoint PSTs.

  • Anonymous
    April 15, 2010
    Is it safe to assume property which you have mentioned(0x0EA0) as a flag for Sharepoint PST. Because I can't find the reference of this property anywhere(even in [MS-PST])

  • Anonymous
    April 16, 2010
    I don't even see PR_ASSOCIATED_SHARING_PROVIDER in the IMsgStore object for my SharePoint Lists store using OutlookSpy...

  • Anonymous
    April 16, 2010
    Eric - did you request it?

  • Anonymous
    April 18, 2010
    request it??? I don't understand this. Is this property not accessible by Outlook Spy itself? Or some work around is there to access this property? Pls clarify...

  • Anonymous
    April 18, 2010
    >Is this property not accessible by Outlook Spy itself? Never said that - I asked if he asked Outlook Spy to go get the prop. I don't use the tool myself, but from screen shots I'd try the "Add Property" button.

  • Anonymous
    April 27, 2010
    Now I am using the below code for filtering out Sharepoint PSTs For Outlook 2007 MAPIFolder.Store.FilePath.ToLower().Contains("sharepoint lists") For Outlook 2003 Get the file path from MAPIFolder.StoreId(http://www.outlookcode.com/codedetail.aspx?id=1434) and apply the above filter on the file path. I tried PSTs generated with different locale settings(Japancese, Korean, etc.) and this code is working out well. By default sharepoint pst file is generated in English.