In 2017, Zetta Insurance decided to abandon Microsoft SharePoint in favor of Bitrix24. Why, why and how - under the cut.
Among the prerequisites were:
- The high cost of ownership of MS SharePoint compared to the available licensing model Bitrix24;
- multifunctionality Bitrix24;
- general trend for import substitution (but this is not certain).
The deadlines were very tight, and SharePoint (SP) was branded. It included a couple of custom modifications and contained gigabytes of data that in no case should have been lost when moving:
- news portal with likes and comments to the news;
- separate sites for company divisions (instructions, regulations, etc.);
- dozens of file libraries;
- staff training materials;
- several automated business processes (which it was immediately decided to move out of the framework of migration - it’s still up to hand to create again).
The new portal on Bitrix24 was conceived by a branded, integrated with AD with customized SSO and user-friendly. Ideally, users should not have felt the effect of the transition at all.
')
So, shook hands (thanks to Habr for introducing us). Hard work began, fragments of which we make public, so that followers do not stumble in search of solutions, sometimes very, very refined. After all, these are not just two competing products, but two ecosystems unfriendly to each other.

To sell something unnecessary, you must first buy something unnecessary. (c) Uncle Fedor
The first thing to migrate is to get the data upload from SharePoint in a digestible format. Some of the information (news, user data, file metadata) was simply taken from the SP database as XML. It was more difficult with the files - they were unloaded into a separate archive, and in the above-mentioned XML, in addition to metadata, they recorded the path to the file from the root of the archive. However, the content of the portal pages could not be collected in this way: not only is the information spread over dozens of sites, it is also stored in tables in an unusable form, with snippets in the SP format.
To transfer the content of the pages, we ventured to the parsing of the combat portal, collecting the generated HTML from them - this path seemed optimal. To do this, they took a
crawler , and on the very first day they encountered a problem: it does not accept the @ symbol in NTLM authorization (I had to ask the customer to change the password for the account). Next is the small thing - we define entry points, exceptions (so as not to collect unnecessary, for example, user profiles) and the content area (it makes no sense to parse the whole page, since Bitrix24 has its own template with a header and footer). The content of the area was saved to a PHP file with the same name and address relative to the site root, which simplified the work on restoring links between pages and made it possible to use the regular visual editor in Bitrix24. The received content contained calls to the SP file manager (replaced by a component call for outputting the corresponding Bitrix24 Drive folder), a call to the Flash player (replaced by HTML5 tools) and numerous links to other pages (resulted in a view relative to the site root, removing the domain name from the link).
AD: magic out of the box or purgatory integrator?
The unloading is ready and given to the customer for approval, and in the meantime we are moving on to the migration itself. Let's start with users, which are initially created from Active Directory, and then enriched with data from SP by means of prepared XML.

Among customers and young integrators - anyone who has not come across in practice with the integration of Bitrix24 with AD, it is considered to be out of the box. All so, if the box called Pandora's box. The point is not at all that it is a bunch of technologies working on different platforms - Linux and Windows. And not in the understanding of the work of samba, without which a step aside from the regular setup wizard is equivalent to a step in a swampy marsh. And not even in those two weeks for which it is really possible to establish network interaction (during the last integration, our sysadmins broke the tambourine).
When the fields were set up and users were taken away, the problem with the structure of the company was revealed. The customer had departments with the same name, located in different branches of the company. Bitriks24 believed that this is the same department and united them. Of the proposed solutions (modification of the Bitrix24 core, modification of the transmitted data on the fly, modification of the structure in AD under the Bitrix24 requirements), this time the most correct one was chosen, which allowed to put an end to this question.
Partition tree
The next step is to transfer departmental page and file data. With the help of the parser, we prepared a tree of sections and pages corresponding to the paths on SharePoint. In view of the detected conflicts with some service sections of Bitrix24, we placed it in the / content / section, and for all internal links to work, we organized a redirect for apache:
RewriteRule ^(.*)\.aspx$ /content$1\.php [R=301,L]
The files after uploading are also located in our tree and are located in the multi-gigabyte archive, which we will unpack to / upload / sp /. “Revive” their run through the script with the addition to the Disk (for the necessary sections) and the nginx rule for the existing links:
location ~* \.(doc|docx|jpeg|jpg|pdf|png|ppt|pptx|rar|txt|xls|xlsx|zip)$ { try_files $uri /upload/files$uri = 404; }
About bravado, branding and budget
There are news and appearance - the very branding, which often takes hundreds of hours and kilometers of integrators' nerves, and costs the customer a little less than putting a falcon into orbit with the return of the first stage. The result of such a titanic effort is usually the newly revised Bitrix24 template, the maintenance costs of which are comparable to the cost of creation: any updating of the Bitrix24 interfaces will require changing the template with all the consequences.

We liked to abandon the monkey labor and save the customer’s budget: we limited ourselves to the color scheme and the addition of several elements like the slider and the custom menu. Economy option with preservation of updates. By the way, it turned out quite well. We made a separate template for news, adapting the layout of the original.
Instead of an epilogue
To close the task, there were still a few touches like the menu settings and other cosmetics, the configuration of cluster architecture to ensure fault tolerance, but not about this today. And today we wanted to give praise to the Russian engineers, and on the living example once again show that everything is possible. A wolf is not so terrible, if it is not the first time in the forest, and you are riding a UAZ with Mikhalych.
All good integrations!