﻿<?xml version="1.0" encoding="utf-8" ?>
<dirsyncConfiguration>
  <ilmConfig>
    <generalSettings>
      <ConfigVersion>13.2.0</ConfigVersion>
      <debugInstrumentation switch="OFF"/>
      <ruleLoggingVerbose switch="OFF"/>
      <idisStore>server=localhost;database=mississippi;Integrated Security=True</idisStore>
      <!-- switch=ID_OCS|ID_OCS_EXCH|ID_EXCH                                                              -->
      <!--       Note:  In addition to diffrent set of flow rules marking this flag will help validation  -->
      <!--              rules to choose diffrent code path. For OCS only customer (without exchange schema-->
      <!--              in source setting will be ID+OCS                                                  -->
      <serviceContractFlag switch="ID_OCS_EXCH"></serviceContractFlag>
      <!-- switch=ON|OFF. ON - will assume we are running in logon-resource forest scenario.              -->
      <!--      logonAccountSidAttributeName is the attribute name where we can get the sid from customer -->
      <!--      forest. This will only be used when the switch is ON                                      -->
      <smtpAddressRegEx><![CDATA[(^([\w-\!#$%^&*+-./=?_{}|~'\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$)]]></smtpAddressRegEx>
      <secondarySmtpAddressRegEx><![CDATA[(^([\w-\!#$%^&*+-./=?_{}|~'\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,5}|[0-9]{1,3})(\]?)$)]]></secondarySmtpAddressRegEx>
      <!-- The following secondary Smtp address reg ex is for Unit Test purposes. It allows for an smtp with lowercase alphas or numerics. -->
      <!--<secondarySmtpAddressRegEx><![CDATA[(^([a-z0-9]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-z0-9]+\.)+))([a-z]{2,4}|[0-9]{1,3})(\]?)$)]]></secondarySmtpAddressRegEx>-->
      <mailNicknameRegEx><![CDATA[^([!#%&'=`~\$\*\+\-\/\?\^\{\|\}a-zA-Z0-9_\u00A1-\u00FF]+((\s|\.)[!#%&'=`~\$\*\+\-\/\?\^\{\|\}a-zA-Z0-9_\u00A1-\u00FF]+)*$)]]></mailNicknameRegEx>
      <!-- switch=ON|OFF. ON - will insert rows into work queue table.                                    -->
      <createworkQueueItem switch="ON"/>
      <!-- The workQueueRetryTime is the time in seconds MMSSPP will wait to re-execute a failed work     -->
      <!-- item in the provisioning service after a Sync is run.                                          -->
      <workQueueRetryTime>60</workQueueRetryTime>
      <!-- The workQueueRetryLimit is the number of times MMSSPP will retry a failed work item.  Once a   -->
      <!-- work item has failed this number of times, the status in IdIS will be set to INACTIVE and no   -->
      <!-- further retries will be attempted.  To restart the retries again (perhaps after the customer   -->
      <!-- has fixed the reason for failure), the CurrentWorkItemFailCount must be set to zero in IdIS    -->
      <!-- and the CurrentWorkItemStatus must be set to FAILED.  Setting this Limit to 0 will indicate    -->
      <!-- to MMSSPP to retry forever (no limit).                                                         -->
      <workQueueRetryLimit>5</workQueueRetryLimit>
      <!-- state:                                                                                         -->
      <!--     0 = NOT_CHECKED -  pass all values                                                         -->
      <!--     1 = CHECKED     -  Only pass values in listed gates, if no gate value, no value will pass  -->
      <proxyAddressGates state="1">
        <!-- Each gate must specify an authority to determine the flow and merging logic for the          -->
        <!-- proxyAddresses attribute.                                                                    -->
        <!--                                                                                              -->
        <!--  "CUSTOMER"  - The gate flows from the Customer AD. Any changes in the proxyAddresses in the -->
        <!--                Customer AD will be flowed to the Managed AD.                                 -->
        <!--  "MANAGED"   - The gate is ignored from the Customer AD.  Any changes in the proxyAddresses  -->
        <!--                in the Managed AD will be retained in the Managed.                            -->
        <!--  "BOTH"      - The gate flows from the Customer AD, but once flowed to the Managed AD, the   -->
        <!--                proxy addresses will not change unless changed in the Managed AD manually.    -->
        <!--                                                                                              -->
        <!-- Each gate must also specify the waitForMailEnabled attribute to true or false, depending on  -->
        <!-- whether the proxy should flow to the managed object prior to the object being mail-enabled.  -->
        <!--                                                                                              -->
        <!-- NOTE: There is special processing for certain proxy address prefixes:                        -->
        <!--  - smtp   - The specified authority is ignored. It is similar to CUSTOMER authority. All     -->
        <!--             changes from the customer are flowed to the managed with two exceptions, the     -->
        <!--             primary SMTP (signified by the capital prefix) is created and added to the       -->
        <!--             managed by using the Customer's mail attribute; Any smtp proxies with a suffix   -->
        <!--             in the Managed Routing Address Suffix List are flowed with BOTH authority        -->
        <!--             (always retains customer proxy additions in the managed).                        -->
        <!--  - x500   - The specified authority is ignored. All x500 proxies always have BOTH authority. -->
        <!--  - sip    - Always have special processing involving lookups in the MMSSPP database to get   -->
        <!--             the appropriate sip suffix.  THIS SHOULD NOT BE LISTED BELOW.                    -->
        <!--                                                                                              -->
        <gate authority="CUSTOMER" waitForMailEnabled="true" >smtp</gate>
        <gate authority="BOTH" waitForMailEnabled="true" >x500</gate>
        <gate authority="BOTH" waitForMailEnabled="true" >merge</gate>
        <gate authority="CUSTOMER" waitForMailEnabled="true" >notes</gate>
        <gate authority="MANAGED" waitForMailEnabled="true" >eum</gate>
        <gate authority="CUSTOMER" waitForMailEnabled="false" >sip</gate>
      </proxyAddressGates>
    </generalSettings>
    <managementAgents>
      <managementAgent name="CUSTOMER">
        <maCategory>Customer</maCategory>
      </managementAgent>
      <managementAgent name="CUSTOMER 2">
        <maCategory>Customer</maCategory>
      </managementAgent>
      <managementAgent name="MANAGED">
        <maCategory>Managed</maCategory>
      </managementAgent>
      <managementAgent name="IDENTITY INFORMATION STORE">
        <maCategory>Identity Information Store</maCategory>
      </managementAgent>
    </managementAgents>
  </ilmConfig>
  <!-- ===================================================
      Settings related to Identity [User, Contact, Group] 
      =================================================== -->
  <identityProvisionSetting>
    <userLocation>OU=Users,OU=MMSSPP,DC=MspMgd,DC=MgdSvc,DC=Lab</userLocation>
    <contactLocation>OU=Contacts,OU=MMSSPP,DC=MspMgd,DC=MgdSvc,DC=Lab</contactLocation>
    <groupLocation>OU=Groups,OU=MMSSPP,DC=MspMgd,DC=MgdSvc,DC=Lab</groupLocation>
    <deletedLocation>OU=PendingDeletions</deletedLocation>
  </identityProvisionSetting>
  <!-- ===========================================
       Settings related to Exchange Online service 
       =========================================== -->
  <exchangeOnlineSetting>
    <!--                                                                                                  -->
    <!-- The following element (resourceMailboxTag) has changed with MMSSPP v2.6. It specifies the        -->
    <!-- attribute to check to determine if the user object is for a resource mailbox. The change is      -->
    <!-- that the attribute's value specifies the identifier for determining the type of resource mailbox -->
    <!-- and whether the remote booking agent is enabled.  The attribute value specifies the prefix to    -->
    <!-- the resource tag.                                                                                -->
    <!--                                                                                                  -->
    <!-- IE: "RESMBX=" -> then the administrator needs to specify for the user object that the attribute  -->
    <!-- is RESMBX=RoomRBA; (RoomRBA and other types are specified and validated in the Provisioning      -->
    <!-- Service's configuration file (MMSSPPServiceConfig.xml).                                          -->
    <!-- NOTE: The ';' character signifies the end of the Resource Mailbox.  That way the attribute can   -->
    <!-- be used to configure things besides the Resource Mailbox.  The ';' can be left out if no other   -->
    <!-- items are needed in the specified attribute.                                                     -->
    <!-- IE: "RESMBX=RoomRBA; XYZ"                                                                        -->
    <!-- This way the attribute can be used to specify the type of resource mailbox and XYZ which can be  -->
    <!-- a configuration item unrelated to resource mailboxes.                                            -->
    <!--                                                                                                  -->
    <!-- The resourceCapacityValue is the string proceeding the Resource Mailbox Capacity, if specified.  -->
    <!-- IE: RESMBX=RoomRBA(CAP=5; XYZ = 10)                                                              -->
    <resourceMailboxTag attributeName="extensionAttribute8" attributeValue="RESMBX=" resourceCapacityValue="CAP="/>
    <!--                                                                                                  -->
    <!-- The following XML element (mailboxtype) has been added in 13.1 to support MT Mailbox types, such -->
    <!-- as INHOLD or SHARED.  As with the proceeding elements, like geoLocTag, resourceMailboxTag or     -->
    <!-- mailboxTypeCodeTag, this element can share an attribute through semi-colon separators. The XML   -->
    <!-- attribute, attributeValue is the Prefix for this settable variable.                              -->
    <mailboxTypeTag attributeName="extensionAttribute8" attributeValue="TYPE="/>
    <!--                                                                                                  -->
    <!-- The main XML Element container, crossForestReconnectionsTag, controls the implementation of the  -->
    <!-- of the Automatic Reconnections for Cloud Services (ARCS) functionality that is used to reconnect -->
    <!-- objects to their cloud services after a cross-forest migration or accidental deletion. If this   -->
    <!-- XML tag is missing or commented out, the ARCS functionality is disabled.                         -->
    <!--                                                                                                  -->
    <!--    The primaryAttribute refers to the Customer attribute that will contain the original          -->
    <!--    objectGUID for the object to reconnect.  This will also be used to reference the MV version   -->
    <!--    of this attribute, so it should only ever be one of the 15 extensionAttribute* attributes.    -->
    <!--    This attribute is always on the main crossForestReconnectionsTag, since this is the same      -->
    <!--    attribute to use for all of the object types (contact, user or group).                        -->
    <!--                                                                                                  -->
    <!--    The immediateDeleteAttributeName is the name of the attribute to set for the customer to make -->
    <!--    an object get deleted immediately (sets or adds to the attribute "DeleteNow").  If this       -->
    <!--    attribute is set to "DeleteNow" when the object is removed from the scope of MMSSPP, MMSSPP   -->
    <!--    will delete the object as if ASR was turned off (it will not move it to PendingDeletions OU). -->
    <!--    If this XML attribute is not set to anything, then there is no way to invoke an Immediate     -->
    <!--    Delete for an object.  In this case, all objects will always be moved to the PendingDeletions -->
    <!--    OU.                                                                                           -->
    <!--                                                                                                  -->
    <!-- Each ReconnectionObjectType element is specified for each object type.  The attributes for these -->
    <!-- XML elements are as follows:                                                                     -->
    <!--                                                                                                  -->
    <!--    The csSecondaryAttribute is the CS attribute that will be used to perform secondary validation-->
    <!--    before reconnections (IE: CustomerMail or employeeID).  This attribute must direct flow to    -->
    <!--    the mvSecondaryAttribute in the MV.                                                           -->
    <!--                                                                                                  -->
    <!--    The mvSecondaryAttribute is the MV attribute that will be used to perform secondary validation-->
    <!--    before reconnections (IE: CustomerMail or employeeID).  This is specified for each            -->
    <!--    ReconnectionObjectType element for each object type allowing different secondary verification -->
    <!--    attributes for each object type.                                                              -->
    <!--                                                                                                  -->
    <!--    The pendingDeleteDuration is the duration in days that a "disconnected" object will remain    -->
    <!--    in the managed AD (in the PendingDeletion OU) before being deleted.  If the original object   -->
    <!--    is restored or a new object is created with its primaryAttribute set to the Object's GUID and -->
    <!--    the secondaryVerification is valid prior to this time, the object is fully reconnected.       -->
    <!--                                                                                                  -->
    <!--    The hidefromAddressLists determines whether we should hide this user from address lists when  -->
    <!--    an object is pending deletion.  ON = Hide, OFF = Keep Customer setting.                       -->
    <!--                                                                                                  -->
    <!-- The following Customer MA changes are also needed to be added to support this feature:           -->
    <!--  - The primary attribute needs to be added to the Join Logic for all objects.                    -->
    <!--  - An advanced import flow is needed to the MV's CustomerAttributeObjectGUIDValue attribute with -->
    <!--    the objectGUID and Primary Attribute as sources and the rules extension,                      -->
    <!--    IAF-CustomerAttributeObjectGUIDValue.                                                         -->
    <!--  - The primary attribute needs to be added as a source to the advanced import flow from the      -->
    <!--    Customer's objectGUID attribute to the MV's CustomerObjectGUIDString Attribute and the rules  -->
    <!--    extension, IAF-CustomerObjectGUIDString.                                                      -->
    <!--  - A Direct import flow needs to be added from the attribute that would normally flow into the   -->
    <!--    specified MV's secondary attribute (mail or employeeID) to the MV's SecondaryVerification     -->
    <!--    attribute.                                                                                    -->
    <crossForestReconnectionsTag primaryAttribute="extensionAttribute7" immediateDeleteAttributeName="extensionAttribute8">
      <ReconnectionObjectType objectType="user" csSecondaryAttribute ="mail" mvSecondaryAttribute="CustomerMail" pendingDeleteDuration="3" hideFromAddressLists="ON"/>
      <ReconnectionObjectType objectType="contact" csSecondaryAttribute ="mail" mvSecondaryAttribute="CustomerMail" pendingDeleteDuration="3" hideFromAddressLists="ON"/>
      <ReconnectionObjectType objectType="group" csSecondaryAttribute ="mail" mvSecondaryAttribute="CustomerMail" pendingDeleteDuration="3" hideFromAddressLists="ON"/>
    </crossForestReconnectionsTag>
    <!-- The enforceLitigationHold flag will tell MMSSPP to not allow deletion of a managed mailbox for a -->
    <!-- user object, if litigation hold is enabled for the mailbox. Instead a sync error will occur if   -->
    <!-- the source object is removed from scope or commands the managed mailbox to be deprovisioned. The -->
    <!-- default value for this field is ON, if it isn't specified in dirSyncConfig.xml.                  -->
    <!-- In addition, if a lit held mailbox source object is removed from scope (or deleted), explicitly  -->
    <!-- deprovisioned (removeMsoMailbox) or Type=INHOLD is set, then we will:                            -->
    <!--   - Disable Logon to the Mailbox by setting msExchMasterAccountSid to the SELF SID.              -->
    <!--   - Hide the user by setting msExchHideFromAddressLists to TRUE.                                 -->
    <!--   - Write a value to the specified attribute in order for Exchange to determine that mail to this-->
    <!--     user should generate an NDR to the sender.                                                   -->
    <!-- 'attributeName' is the attribute for the value. 'attributeValue' is the value to write.          -->
    <!-- 'appendValue' is an indicator if we are to append the value to the attribute (after a semi-colon,-->
    <!-- if the attribute is not empty).                                                                  -->
    <!-- If attributeName and/or attributeValue are not set in this XML element, then nothing is written  -->
    <!-- to an attribute.  If appendValue is not set, default is false (entire attribute will be set).    -->
    <enforceLitigationHold switch="ON"/>
    <customerRoutingAddressSuffixList>
      <suffix>@MspCust1.Customer.Lab</suffix>
      <suffix>@MspCust1A.Customer.Lab</suffix>
      <suffix>@MspCust2.Customer.Lab</suffix>
    </customerRoutingAddressSuffixList>
    <!--<managedRoutingAddressSuffix>@msp25mgd.selfhost.corp.microsoft.com</managedRoutingAddressSuffix>-->
    <managedRoutingAddressList>
      <suffix>@MspMgd.MgdSvc.Lab</suffix>
    </managedRoutingAddressList>
    <!-- mailInclusionList: Customer Mail attribute ends with suffix that appear in this list will be considered as 
        Managed Domain List and will used to determine the mailbox provisioning in managed side. 
        These entries are case in-sensitive -->
    <mailInclusionList>
      <suffix>@MspCust1.Customer.Lab</suffix>
      <suffix>@MspCust1A.Customer.Lab</suffix>
      <suffix>@MspCust2.Customer.Lab</suffix>
      <suffix>@customer.de</suffix>
      <suffix>@fabrikam.com</suffix>
    </mailInclusionList>
    <exchangePolicyExcludedFlag switch="ON"></exchangePolicyExcludedFlag>
    <!-- rusPolicyExcludedList: Customer Mail attribute ends with suffix that appear in this list will be stamped with 
        Exchange Policies Excluded GUID in managed.msExchPoliciesExcluded attribute. This will be only enforced 
        when exchangePolicyExcludedFlag switch = ON in general section of this configuration settings. 
        These entries are case in-sensitive -->
    <rusPolicyExcludedList>
      <suffix>@MspCust1.Customer.Lab</suffix>
      <suffix>@MspCust1A.Customer.Lab</suffix>
      <suffix>@MspCust2.Customer.Lab</suffix>
      <suffix>@customer.de</suffix>
      <suffix>@fabrikam.com</suffix>
    </rusPolicyExcludedList>
    <mgdCnLength>49</mgdCnLength>
  </exchangeOnlineSetting>

  <!-- =====================================
       Setting related to OCS Online Service
       ===================================== -->
  <ocsOnlineSetting>
    <ocsOnlineEnabled switch="ON"/>
    <ocsBitmap attributeName="extensionAttribute14"/>
    <ocsMultiValuedString attributeName="extensionAttribute15"/>
  </ocsOnlineSetting>

  <!-- ============================================
       Setting related to Sharepoint Online Service
       ============================================ -->
  <sharepointOnlineSetting>
  </sharepointOnlineSetting>
</dirsyncConfiguration>
