{"id":2884,"date":"2018-03-28T10:13:17","date_gmt":"2018-03-28T08:13:17","guid":{"rendered":"http:\/\/wordpress.networknet.nl\/?p=2884"},"modified":"2018-03-28T10:13:17","modified_gmt":"2018-03-28T08:13:17","slug":"office-365-onedrive-for-business-automatic-sign-in","status":"publish","type":"post","link":"https:\/\/www.networknet.nl\/apps\/wp\/archives\/2884","title":{"rendered":"Office 365: OneDrive for Business &#8211; Automatic sign in"},"content":{"rendered":"<p>\n\tWorking on Windows 10 migration project and there is a need to enable automatic sign in of OneDrive for Business client when new user profile has been created. Windows 1709 image is golden installation image that will be used for global deployment. In the past months I have been working on different parts and with Windows 10 1709 the OneDrive client is now fully integrated into the profile.&nbsp;\n<\/p>\n<p>\n\tThe challenge I have is to do more automatic configuration. Speed up the profile creation process for smooth and less IT effort to deliver the computer to the end user.&nbsp;&nbsp;\n<\/p>\n<p>\n\tThanks to Adam Fowler from his post <a href=\"https:\/\/www.adamfowlerit.com\/2018\/02\/onedrive-business-auto-sign-windows-10\/\">https:\/\/www.adamfowlerit.com\/2018\/02\/onedrive-business-auto-sign-windows-10\/<\/a> I was able to complete the remaining part on my end. The perquisites to have my script are working:\n<\/p>\n<ul>\n<li>\n\t\tADFS infrastructure\n\t<\/li>\n<li>\n\t\tAD internal UPN same as in the cloud\n\t<\/li>\n<li>\n\t\tOffice 365 licenses enabled\n\t<\/li>\n<\/ul>\n<p>\n\tI have done my homework, ADFS is in place, UPN is fixed, license for O365 enabled so now I only need a script sequence to run some commands to automatically do that. One important settings is from Computer Configuration GPO policy to enable &quot;Silently configure OneDrive using the primary Windows account&quot;. This was for me in place before but was missing the part below to really run the setup and make sure modern authentication was enabled for OneDrive within the user profile (HKEY_CURRENT_USER)\n<\/p>\n<p>\n\t<br \/>\n\t<a href=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2018\/03\/clip_image001.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"clip_image001\" border=\"0\" height=\"206\" src=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2018\/03\/clip_image001_thumb.png\" style=\"border: 0px currentcolor; border-image: none; display: inline; background-image: none;\" title=\"clip_image001\" width=\"680\" \/><\/a>\n<\/p>\n<p>\n\t<br \/>\n\tCreate new CMD file below and make sure it added to RunOnce\n<\/p>\n<ul>\n<li>\n\t\tI am using SCCM task sequence to add this to the default profile registers and place the CMD locally on the computer\n\t<\/li>\n<li>\n\t\tThis file can also be executed manually or through logon script\n\t<\/li>\n<\/ul>\n<h3>\n\tOneDrive-Configuration.cmd<br \/>\n<\/h3>\n<pre class=\"brush:text\">\r\n%localappdata%\\Microsoft\\OneDrive\\Update\\OneDriveSetup.exe\r\ntaskkill \/f \/im OneDrive.exe\r\nreg add HKCU\\Software\\Microsoft\\OneDrive \/v EnableADAL \/t REG_DWORD \/d 1 \/f\r\n&quot;%localappdata%\\Microsoft\\OneDrive\\OneDrive.exe&quot;<\/pre>\n<p style=\"margin: 0in;\">\n\tSetup starts to initialize OneDrive for the user, kills the current OneDrive.exe process, sets the ADAL for modern authentication and starts OneDrive again.<br \/>\n\t<a href=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2018\/03\/clip_image002.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"clip_image002\" border=\"0\" height=\"281\" src=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2018\/03\/clip_image002_thumb.png\" style=\"border: 0px currentcolor; border-image: none; display: inline; background-image: none;\" title=\"clip_image002\" width=\"523\" \/><\/a>\n<\/p>\n<p>\n\tFinal end result :). OneDrive is configured and synced.\n<\/p>\n<p lang=\"en-US\" style=\"margin: 0in; font-family: calibri; font-size: 11pt;\">\n\t<a href=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2018\/03\/image.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"164\" src=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2018\/03\/image_thumb.png\" style=\"border: 0px currentcolor; border-image: none; display: inline; background-image: none;\" title=\"image\" width=\"278\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working on Windows 10 migration project and there is a need to enable automatic sign in of OneDrive for Business client when new user profile has been created. Windows 1709 image is golden installation image that will be used for global deployment. In the past months I have been working on different parts and with Windows 10 1709 the OneDrive client is now fully integrated into the profile.&nbsp; The challenge I have is to do more automatic configuration. Speed up the profile creation process for smooth and less IT effort to deliver the computer to the end user.&nbsp;&nbsp; Thanks to Adam Fowler from his post https:\/\/www.adamfowlerit.com\/2018\/02\/onedrive-business-auto-sign-windows-10\/ I was able to complete the remaining part on my end. The perquisites to have my script are working: ADFS infrastructure AD internal UPN same as in the cloud Office 365 licenses enabled I have done my homework, ADFS is in place, UPN is fixed, license for O365 enabled so now I only need a script sequence to run some commands to automatically do that. One important settings is from Computer Configuration GPO policy to enable &quot;Silently configure OneDrive using the primary Windows account&quot;. This was for me in place before but was missing the part below to really run the setup and make sure modern authentication was enabled for OneDrive within the user profile (HKEY_CURRENT_USER) Create new CMD file below and make sure it added to RunOnce I am using SCCM task sequence to add this to the default profile registers and place [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2883,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[846],"tags":[849,730,848,847,11,850],"class_list":["post-2884","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office-365","tag-automatic","tag-logon","tag-office-365","tag-onedrive","tag-script","tag-sign-in"],"_links":{"self":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts\/2884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/comments?post=2884"}],"version-history":[{"count":3,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts\/2884\/revisions"}],"predecessor-version":[{"id":2893,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts\/2884\/revisions\/2893"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/media\/2883"}],"wp:attachment":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/media?parent=2884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/categories?post=2884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/tags?post=2884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}