I want to write CSOM code to migrate custom pages with custom page layout and WebParts such as content editor, content query from SharePoint 2010 site on intranet to SharePoint online.

I need to write code on my Azure VM, how can I access local intranet SharePoint 2010 site from Azure VM? I read about Azure Virtual Network not sure if that's solution.

Also, I would like to know about some alternative options for this kind of migration. I'm aware about using third party tools such as AvePoint, Metalogix and Sharegate.

2 Answers 2


There are a number of 3rd party tools, I have experience with both Sharegate and Metalogix - I'd strongly recommend them both.

For your scenario, it appears your doing it the hard way, using a tool such as Sharegate would be far more efficient. Many factors to think about such as retaining created dates, authors, workflows etc, would be a lot of effort to build manually.

Regarding your initial question, it would be worth looking at the data access gateway (Azure), this allows you to connect from an Azure VM to an on-prem system.



To really answer your question, you should be establishing a Site to Site VPN connection between Azure and your on-prem network. In Azure, you would also establish a VNet with a private IP range and join the VM to your domain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.