Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm attempting to use the REST API to migrate files from our users' personal sharepoint sites (e.g. http://organization-my.sharepoint.com/personal/bob@organization.onmicrosoft.com).

The account which I've authorized is a global administrator in the system. During the oAuth flow, our app requests the AllSites.Manage and AllProfiles.Manage scopes.

I'm able to view/modify my personal site without difficulty. In order to view other users' personal sites, I have to add myself as a "site collection owner" in : sharepoint admin center -> user profiles -> i:0#.f|membership|user@organization.onmicrosoft.com Doing so it rather tedious and I'd like to either automate the process, or find some way to configure my app scopes / administrative user so it's not necessary.

To that end, I've been trying to assign permissions via the roleassignments endpoints. Unfortunately, _api/web/roleassignments consistently returns:

{"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":   {"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}
share|improve this question
Did you try to add FullControl permission on the Tenant? –  Vardhaman Deshpande Dec 4 '13 at 6:28
I can't request the FullControl permission via OAuth - AFAIK. –  Koobz Dec 10 '13 at 17:39
msdn.microsoft.com/en-us/library/jj687470.aspx "Table 1 shows the same app permission request scope URIs that are shown in App permissions in SharePoint 2013, except it has one additional column (Scope Alias) and the FullControl right is not available in the Available Rights column." –  Koobz Dec 10 '13 at 17:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.