Andrew Connell walks through the Office 365 Patterns & Practices Scenario provisioning OneDrive for Business with a console app. This code can be found on GitHub here https://github.com/OfficeDev/PnP/tree/master/Samples/Provisioning.OneDriveProvisioning
As part of the new Client Side Object Model (CSOM) assemblies released in the SharePoint Online Client Components SDK, we now have many new capabilities and improvements. One specifically is the capability to programmatically provision OneDrive for Business sites in Office 365.
There is basically two ways to provision a user's OneDrive for Business site, the first way is user initiated that is when the user navigates to their newsfeed, site or OneDrive links that are within the suite bar, the other is by pre-provisioning leveraging CSOM. In some cases it might not be feasible to have the user initiate the provision process. Say for example, you are migrating from an on-premises SharePoint farm or other repositories, and you don't want to wait for the user to click a link before you start your migration.