Skip to content

Instantly share code, notes, and snippets.

@gscales
Created December 9, 2020 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gscales/1ebb604bdbc06b7c3252d170c6939877 to your computer and use it in GitHub Desktop.
Save gscales/1ebb604bdbc06b7c3252d170c6939877 to your computer and use it in GitHub Desktop.
FindFolder JS Example TeamsMessagesData
function FindFolderRequest(){
var RequestString =
'<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
' <soap:Header>' +
' <t:RequestServerVersion Version="Exchange2016" />' +
' </soap:Header>' +
' <soap:Body>' +
'<m:FindFolder Traversal="Shallow">' +
'<m:FolderShape>' +
' <t:BaseShape>AllProperties</t:BaseShape>' +
'</m:FolderShape>' +
'<m:IndexedPageFolderView MaxEntriesReturned="1" Offset="0" BasePoint="Beginning" />' +
'<m:Restriction>' +
' <t:IsEqualTo>' +
' <t:FieldURI FieldURI="folder:DisplayName" />' +
' <t:FieldURIOrConstant>' +
' <t:Constant Value="TeamsMessagesData" />' +
' </t:FieldURIOrConstant>' +
' </t:IsEqualTo>' +
'</m:Restriction>' +
'<m:ParentFolderIds>' +
' <t:DistinguishedFolderId Id="root" />' +
'</m:ParentFolderIds>' +
'</m:FindFolder>' +
' </soap:Body>' +
'</soap:Envelope>'
return RequestString;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment