I'm having trouble getting Get-SPServiceContext to return a SiteSubscriptionId that is not a bunch of zeros. I'm using an account 'SP_Sync' and set permissions to

  • Farm Administrators group
  • User Profile Service App /w Full control
  • SPShellAdmin

Is there any other permissions I need?


I'm trying to access the user profile manager in powershell. All the examples I've seen are loading the context of the site in the userpfilemanager object. I can't seem to find the permissions I need to access this object.

I thought it was related to the SPServiceContext, but I can't actually run the command

New-Object  Microsoft.Office.Server.UserProfiles.UserProfileManager

I'm receiving the error:

New-Object : Exception calling ".ctor" with "0" argument(s): "Value cannot be null. Parameter name: serviceContext" At line:1 char:19 + $profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileMan ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

1 Answer 1


If their is no site subscription then you will get bunch of zero.


But you need the following permissions(few you already have)

  • farm admin group
  • SPShellAdmin
  • DBO rights on the Content Databases

I would run the command under the farm admin account( the account which run the SharePoint Timer services or central admin app pool).

  • It just has public rights on the server. Does it need the same as the sp_farm account?
    – MickB
    Oct 31, 2014 at 20:18
  • in opnion yes, because these commands want to grab the information form Database....for get i think read will be fine
    – Waqas Sarwar MVP
    Oct 31, 2014 at 20:20
  • Is there a way to run a query on the DB for this id? I'm trying to gain access to some of the profile manager information that spuser doesn't have
    – MickB
    Oct 31, 2014 at 20:34
  • what you mean run query to db server? for what?
    – Waqas Sarwar MVP
    Oct 31, 2014 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.