Skip to main content
Version: Classic

SharePoint Online

With the SharePoint Online address provider you can access your SharePoint lists.

Configuration​

To access SharePoint Online, authentication via OAuth is required. This requires an "App Registration" in Azure Active Directory. Perform the following steps:

  • Log in via the Azure Portal.
  • Select your Azure Active Directory & copy the TenantId.
  • In "App registrations" create a new app with any name you like.
  • In "API permissions" add the Microsoft Graph Sites.Read.All permission (requires Admin Consent).
  • In "Certificates & secrets" add a new client secret.
<!-- AddressService -->
<AddressProvider id="E10A8313-A92D-4CB2-A12B-9AEB58F39207" order="1" active="true">
<!-- serverside SharePoint Online address provider -->
<AddressProvider id="5da866b2-e63a-11eb-ba80-0242ac130004" Title="SharePoint">
<HostUrl>{HostUrl}</HostUrl>
<TenantId>{TenantId}</TenantId>
<ClientId>{ClientId}</ClientId>
<ClientSecret>{ClientSecret}</ClientSecret>
<Site>{SiteName}</Site>
<List>{ListName}</List>
<SearchParameters>
<SearchParameter Name="firstName" Label="Vorname/Name" Type="String" Length="100" Sort="1" />
<SearchParameter Name="street" Label="Strasse" Type="String" Length="100" Sort="2" />
</SearchParameters>
<Query>
<Filters>
<Filter>substringof('{street}', fields/Street)</Filter>
<Filter>substringof('{firstName}', fields/Vorname)</Filter>
</Filters>
<OrderBy>fields/Vorname</OrderBy>
<Top>30</Top>
<Expand>fields(expand=LinkedPerson)</Expand>
<Select>fields/Vorname, Fields/Name, fields/SpaltenName</Select>
</Query>
<Debug>true</Debug>
<Mapping>
<Map Source="Name" Target="Person_LastName"></Map>
<Map Source="Vorname" Target="Person_FirstName"></Map>
<Map Source="Adresse.address.street" Target="Person_Street" />
<Map Source="Adresse.address.city" Target="Person_City"></Map>
<Map Source="Adresse.address.postalCode" Target="Person_ZipCode"></Map>
</Mapping>
</AddressProvider>
</AddressProvider>

Parameters​

  • id 5da866b2-e63a-11eb-ba80-0242ac130004*.
  • Title Title of the address provider. Default: "SharePoint"
  • HostUrl Host-Url of SharePoint Online (without https://) e.g. company.sharepoint.com.
  • TenantId The TenantId of the AAD
  • ClientId The AppClient ID of the App configured in the AAD
  • ClientSecret Client Secret of the APP configured in the AAD (can be encrypted).
  • Site Name of the site in which the list is created.
  • List Name of the list
  • SearchParameter List with all input options
    • Name Unique id for the parameter. Corresponds to the placeholder in the Odata query.
    • Label Displayed text in front of the input field
    • Type Input type: String (text), Long (number), Boolean (Yes/No) or Date (date)
    • Length Maximum length for strings
    • Sort Sort value against the other parameters
  • Query The query for the query on the service is written with OData v4. From the list of supported operations the following are possible: expand, filter, orderby, select, top. The columns from the list are always stored in fields/, so it is important that all operations (except top) always have the prefix fields/. E.g. <select>fields/firstname</select>. The search parameters can be referenced within the query using {SearchParamId}.
    • Expand The Expand operator can be used to expand multi-dimensional/linked fields. Classic examples are linked persons and address. Default is fields.
    • Filter The Filter operator can be used to filter the entries based on the entered search values. List of comparison operators. Caution, note restrictions below.
    • OrderBy The OrderBy operator can be used to sort the entries by specific columns. Default is unsorted.
    • Select with the Select operator the returned columns/information can be restricted. Default is all information selected.
    • Top The Top operator can be used to limit the maximum number of returned results. Default is 50.
  • Debug true whether additional information should be logged (available values with names for the mapping, more detailed error messages).
  • Mapping For SharePoint lists it is mandatory to define a default contact mapping. Without mapping the entries cannot be processed. For mapping the column names are used as SourceAttribute. Exceptions are fields of type location and link.
    • Location
      • Locality information is automatically split by Sharepoint into several columns. These then do not contain the column name, but the English designation: Street, PostalCode, City etc.. The complete address is added with DispName. If there are several columns of type location in a list, they will be numbered from left to right, starting with the second address with 0, e.g. Street, Street0, Street1 for three addresses.
      • OneOffixx also prepares the addresses itself with ColumnName.address.City and so on.
    • Link
      • Links are returned by SharePoint splitted into url and display name: ColumnName.Url, ColumnName.Description.
  • Icon Base64 icon displayed to the user in the recipient dialog.
caution

WARNING There are some restrictions for the filter query:

  • Only indexed columns can be searched. MS documentation on adding indexed columns
  • Contrary to Microsoft's comparison operator documentation, the contains(FieldName, 'SearchValue') comparison operator does not work! You have to use substringof('SearchValue',FieldName) instead.
  • Empty values are not considered part of the content when using substringof. This has as consequence that if not all search parameters have a value, no entry will be found. For this reason, the filter query was built in such a way that several <Filters></Filters> can be defined within the <Filter></Filter>. A <Filter></Filter> is only considered if a value has been entered for each search parameter it contains:
substringof('{street}', fields/Street) substringof('{firstName}', fields/Vorname) and substringof('{street}', fields/Street) ```xml