Just successfully completed setting the silent configuration in a Windows 10 test environment and wanted to share.
Prerequisites:
1. Windows 10(at least with Anniversary update) with OneDrive next gen sync client, hybrid Azure AD joined; (Should work with Windows 7 though I haven't tested)
2. Azure AD Connect is syncing domain user accounts to Azure AD(Or separate accounts but with same username and passwords)
Registry setting or Group policy configuration
HKEY_CURRENT_USER\Software\Microsoft\OneDrive\ | Key: EnableADAL | DWORD | Value: 1 | |
HKEY_CURRENT_USER\Software\Microsoft\OneDrive\ | Key: ClientEverSignedIn | DWORD | Value: 0 | This will be changed to 1 after OneDrive runs for the first time, regardless of whether the silent configuration succeeded or not. |
- Group Policy computer configuration -> Policies -> Administrative templates -> OneDrive
- Silently configure OneDrive using primary Windows account: Enabled
- Allow syncing OneDrive accounts for only specific organizations: Enabled
- The maximum size of a user's OneDrive folder before they will be prompted to choose which folders are downloaded: Enabled (Optional)
Be careful when you set the above group policy configurations though. If you are following https://support.office.com/en-us/article/Find-your-Office-365-tenant-ID-6891b561-a52d-4ade-9f39-b492285e2c9b , the second method (using Login-AzureRmAccount) WILL NOT give you the correct Tenant ID. Find Tenant ID in your Azure AD portal instead.