{"id":3301,"date":"2017-07-07T13:55:58","date_gmt":"2017-07-07T20:55:58","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=3301"},"modified":"2023-02-04T06:32:51","modified_gmt":"2023-02-04T14:32:51","slug":"onedrive-hates-admin-rights","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/onedrive-hates-admin-rights\/","title":{"rendered":"OneDrive Can&#8217;t Be Run Using Full Administrator Rights"},"content":{"rendered":"<div align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/images\/no-admin.png\" width=\"165\" height=\"165\" title=\"Administrator rights not allowed\" alt=\"Administrator rights not allowed\" border=\"0\" ><\/div>\n<h2><b>OneDrive hates admin rights<\/b><\/h2>\n<p>A customer looking to run OneDrive as a Windows Service with AlwaysUp recently contacted our support team for help. Even though he had diligently followed our <a href=\"\/products\/AlwaysUp\/Apps\/RunOneDriveAsAService.html\">step-by-step tutorial<\/a>, his files were not being synchronized as intended. OneDrive refused to refused to work as a service!<\/p>\n<p>After confirming that his <a href=\"\/blog\/alwaysup\/onedrive-synchronizing-files\/\">files were not being copied<\/a>, our support team launched OneDrive &#8220;in this session&#8221; &#8212; to see the normal tray icon and check if an error was being reported. We were greeted by this puzzling error message:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/onedrive-cant-be-run-using-full-admin-rights.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"OneDrive can't run using full administrator rights\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/images\/onedrive-cant-be-run-using-full-admin-rights.png\" width=\"361\" height=\"179\" title=\"OneDrive can't be run using full administrator rights (click to enlarge)\" alt=\"OneDrive can't be run using full administrator rights\" border=\"0\"><\/a><\/div>\n<\/p>\n<p>So it seems that OneDrive doesn&#8217;t like to be run with admin rights. And the customer&#8217;s account was a member of the Administrators group &#8212; which is recommended for smooth operation as a Windows Service with AlwaysUp.<\/p>\n<h2><b>UAC enables an administrator to run OneDrive normally<\/b><\/h2>\n<p>But why does OneDrive work at all in the customer&#8217;s admin account? Why doesn&#8217;t the software complain when he starts OneDrive normally on his desktop?<\/p>\n<p>The answer lies with Microsoft&#8217;s <a href=\"https:\/\/en.wikipedia.org\/wiki\/User_Account_Control\" target=\"_blank\" rel=\"noopener noreferrer\">User Account Control (UAC)<\/a> security feature. By default, applications started interactively are run with lower, non-admin privileges. This happens for all accounts &#8212; even for administrators. OneDrive seems to require that lower privilege context to do its work. Indeed, in this <a href=\"https:\/\/support.office.com\/en-us\/article\/OneDrive-desktop-app-for-Windows-850703dd-ea56-4c7a-bff5-6c2e4da227cf\" target=\"_blank\" rel=\"noopener noreferrer\">OneDrive desktop FAQ<\/a>, Microsoft confirms that UAC is what enables OneDrive to be started by an administrator. If we removed UAC from the equation (by by right-clicking on OneDrive.exe and selecting &#8220;Run as administrator&#8221;) we were able to reproduce the error straightaway.<\/p>\n<p>But while UAC restricts rights for the desktop user, <b>UAC is not in play when running in the context of a windows service<\/b>. Services are always run with the highest privileges. We must find a way for our customer to start OneDrive with reduced rights to avoid the error.<\/p>\n<h2><b>How to launch OneDrive with reduced rights from AlwaysUp<\/b><\/h2>\n<p>Our new <a href=\"\/products\/RunWithRestrictedRights\/\">Run with Restricted Rights<\/a> command-line utility comes to the rescue. Here are the steps we performed to get the customer up and running:<\/p>\n<ol>\n<li>\n<p>Download <a href=\"\/products\/RunWithRestrictedRights\/\">RunWithRestrictedRights.exe<\/a> (it&#8217;s free).<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/download-run-with-restructed-rights.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Download Run with Restricted Rights\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/download-run-with-restructed-rights.png\" title=\"Download Run with Restricted Rights (click to enlarge)\" alt=\"Download Run with Restricted Rights\" border=\"0\" width=\"520\"><\/a><\/div>\n<\/p>\n<p>Save it to a new folder on your hard drive. We suggest C:\\Tools.<\/p>\n<\/li>\n<li>\n<p>Start AlwaysUp.<\/p>\n<p>Double-click your OneDrive service to edit it.<\/p>\n<\/li>\n<li>\n<p>In the <b>Application<\/b> field, enter the full path to RunWithRestrictedRights.exe.<\/p>\n<p>In the <b>Arguments<\/b> field, enter the full path to your OneDrive executable, enclosed in quotes. It should look something like this:<\/p>\n<blockquote><p>&#8220;C:\\Users\\[USER-NAME]\\AppData\\Local\\Microsoft\\<br \/>OneDrive\\OneDrive.exe&#8221;<\/p><\/blockquote>\n<p>where [USER-NAME] is the name of your Windows account.<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/onedrive-restricted-rights-alwaysup.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"OneDrive with AlwaysUp\" target=\"_blank\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/images\/onedrive-restricted-rights-alwaysup.png\" title=\"OneDrive with AlwaysUp (click to enlarge)\" alt=\"OneDrive with AlwaysUp\" border=\"0\" width=\"411\" height=\"592\"><\/a><\/div>\n<\/p>\n<\/li>\n<li>\n<p>Save your settings.<\/p>\n<\/li>\n<\/ol>\n<p>With this new setup, AlwaysUp will start RunWithRestrictedRights.exe, which will launch OneDrive with diminished permissions. You should not see the &#8220;full administrator rights&#8221; error anymore.<\/p>\n<p>Note that we plan to add the capability to run an application with diminished rights directly from AlwaysUp. That feature will probably included in AlwaysUp version 10.3, which should released to all customers in September\/October.<\/p>\n<div align=\"center\">\n<div class=\"cta-button-1\">\n<table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td align=\"center\"><a href=\"\/blog\/tag\/onedrive\/\" title=\"More about running OneDrive as a Windows Service\"><span><nobr>Read more articles about OneDrive&#8230;<\/nobr><\/span><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/version-11-multiple-windows-services\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"New Version\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/new-version-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Running Multiple Windows Services? AlwaysUp 11 is Here to Help!<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/alwaysup-version-8-0-released\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"New Version\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/new-version-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">AlwaysUp Version 8.0 Released<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/dropbox-service-not-working-after-update\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"My Dropbox Windows Service no longer works after Updating Dropbox \u2013 Help!\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/dropbox-trouble-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">My Dropbox Windows Service no longer works after Updating Dropbox - Help!<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>OneDrive hates admin rights A customer looking to run OneDrive as a Windows Service with AlwaysUp recently contacted our support team for help. Even though he had diligently followed our step-by-step tutorial, his files were not being synchronized as intended. &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/onedrive-hates-admin-rights\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3332,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[22,26,110,135,170],"class_list":["post-3301","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-alwaysup","tag-access-rights","tag-alwaysup-tag","tag-onedrive","tag-run-with-restricted-rights","tag-troubleshooter"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=3301"}],"version-history":[{"count":1,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3301\/revisions"}],"predecessor-version":[{"id":11798,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3301\/revisions\/11798"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/3332"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=3301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=3301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=3301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}