none
[EWS][E2013][SOAP] Can I set first-day of week? RRS feed

  • Question

  • I can retrieve the first day of the week using OWA User options with SOAP:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
       <soapenv:Header>
          <typ:RequestServerVersion Version="Exchange2013"/>
       </soapenv:Header>
       <soapenv:Body>
        <mes:GetUserConfiguration>
          <mes:UserConfigurationName Name="OWA.UserOptions">
            <typ:DistinguishedFolderId Id="root"/>
          </mes:UserConfigurationName>
          <mes:UserConfigurationProperties>All</mes:UserConfigurationProperties>
        </mes:GetUserConfiguration>
       </soapenv:Body>
    </soapenv:Envelope>

    (How) is it possible to *set* FirstDOW?

    I need to force that from program code for a syncing app, in case users have different FirstDOW settings.

    Tuesday, December 10, 2013 2:27 PM

All replies

  • To update or Set the First Day of the Week you need to get the existing configuration, make a change to the Roaming dictionary value "weekstartday" (or set it if its not set). Value start at 0 so Sunday = 0 , Monday =1 . You then use the UpdateUserConfiguration option (posting back all the setting otherwise you got from the GetUserConfiguration or you'll loose the existing) eg

      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="
    http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://sc
    hemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xml
    soap.org/soap/envelope/">
        <soap:Header>
          <t:RequestServerVersion Version="Exchange2010_SP2" />
        </soap:Header>
        <soap:Body>
          <m:UpdateUserConfiguration>
            <m:UserConfiguration>
              <t:UserConfigurationName Name="OWA.UserOptions">
                <t:DistinguishedFolderId Id="root" />
              </t:UserConfigurationName>
              <t:Dictionary>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>spellingdictionarylanguage</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>4</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>UserOptionsMigrationState</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>1</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>signaturehtml</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>String</t:Type>
                    <t:Value>&lt;html&gt;
    &lt;body&gt;
    &lt;div name="divtagdefaultwrapper" style="margin:0px; font-family:Calibri,Arial
    ,Helvetica,sans-serif"&gt;
    &lt;/div&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    </t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>ShowSenderOnTopInListView</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>showweeknumbers</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>autoaddsignature</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>false</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>hourincrement</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>30</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>spellingignoreuppercase</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>false</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>spellingignoremixeddigits</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>GlobalReadingPanePosition</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>0</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>UseDataCenterCustomTheme</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>0</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>ShowReadingPaneOnFirstLoad</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>false</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>signaturetext</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>String</t:Type>
                    <t:Value>
                    </t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>ConversationSortOrder</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>5</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>ShowPreviewTextInListView</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>enablereminders</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>alwaysshowfrom</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>isquicklinksbarvisible</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>NavigationBarWidthRatio</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>String</t:Type>
                    <t:Value>0.11393229166666667</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>IsMailRootFolderTreeCollapsed</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>timeformat</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>String</t:Type>
                    <t:Value>h:mm tt</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>HideDeletedItems</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>false</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>themeStorageId</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>String</t:Type>
                    <t:Value>wrld</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>weekstartday</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>0</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>timezone</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>String</t:Type>
                    <t:Value>AUS Eastern Standard Time</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>navigationbarwidth</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Integer32</t:Type>
                    <t:Value>335</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>dateformat</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>String</t:Type>
                    <t:Value>dd/MM/yyyy</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>spellingcheckbeforesend</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>ShowInferenceUiElements</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>true</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
                <t:DictionaryEntry>
                  <t:DictionaryKey>
                    <t:Type>String</t:Type>
                    <t:Value>enableremindersound</t:Value>
                  </t:DictionaryKey>
                  <t:DictionaryValue>
                    <t:Type>Boolean</t:Type>
                    <t:Value>false</t:Value>
                  </t:DictionaryValue>
                </t:DictionaryEntry>
              </t:Dictionary>
            </m:UserConfiguration>
          </m:UpdateUserConfiguration>
        </soap:Body>
      </soap:Envelope>
    Cheers
    Glen

    Wednesday, December 11, 2013 5:44 AM
  • Thank you. I was surprised I could not find a SetUserConfiguration. UpdateUserConfiguration it is ;-)
    Wednesday, December 11, 2013 7:25 AM