Getting error with "Administrators" security type in SPServiceAppSecurity
See original GitHub issueDetails of the scenario you try and problem that is occurring: I’m trying to execute this code:
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
$membersToInclude = @()
$membersToInclude += MSFT_SPServiceAppSecurityEntry {
Username = "CONTOSO\SharePointFarmAccount"
AccessLevel = "Full Control"
}
$membersToInclude += MSFT_SPServiceAppSecurityEntry {
Username = "CONTOSO\SharePointServiceApps"
AccessLevel = "Full Control"
}
SPServiceAppSecurity UserProfileServiceSecurity
{
ServiceAppName = "User Profile Service Application"
SecurityType = "Administrators"
Members = $membersToInclude
PsDscRunAsCredential = $SetupAccount
}
}
}
I’m receiving the following error:
Cannot bind argument to parameter 'ReferenceObject' because it is null.
+ CategoryInfo : InvalidData: (:) [], CimException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.CompareObje
ctCommand
When I look in the MOF file, I can see that there is no empty value. Everything is well populated. Perhaps I’m doing something wrong but I don’t see what. I didn’t try to use ‘MembersToInclude’ and use ‘Members’ instead because I want to make sure that only the list provided is admin on the service and no one else.
Version of the Operating System and PowerShell the DSC Target Node is running: Windows Server 2016 with SharePoint 2016
Version of the DSC module you’re using: 1.7.0.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Errors when connecting to SharePoint Online Management ...
Describes how to resolve connectivity problems to SharePoint Online Management Shell.
Read more >Error: Access Denied (Including Site Collection Admins) for ...
I have fixed the issue by running Powershell command and site is working fine now. $wa = Get-SPWebApplication -Identity ...
Read more >cannot contact web site or the web site does not support ...
Problem : When trying to connect to SharePoint Online through PowerShell script, I got this error message “Cannot contact web site ...
Read more >asp.net - strange IIS authorization issue for administrator
This seems to be saying that the client is not being authorised as their Windows account. This seems to be the area to...
Read more >Security Token Service not available - sharepoint2013admin
In the Application Pools list, right-click SecurityTokenServiceApplicationPool, and then click Start. If the application pool is started already ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@BrianFarnhill Sure. I will open another issue for the “doing nothing” matter. Thanks
I guess this is registered in issue #641, which is still open.