Cannot update secure store credential mapping due to “Access is denied to the Secure Store Service”
Hi Folks
Just a quick heads up on this one as it took getting SQL Server Profiler and Debugger out to resolve.
I used PowerShell to update secure store credentials as follows:
Update-SPSecureStoreCredentialMapping`
-Identity:$SecureStoreApplication`
-Principal:$Administrator`
-Values:$CredentialValues`
-Confirm:$false
And I got:
Access is denied to the Secure Store Service
This error message does NOT mean you have not got access, if you drill down into the SQL you’ll eventually find its running this stored procedure:
proc_sss_SetCredentials
Now if you look carefully (debugging helps) you’ll find that what generates the error message is:
IF@GroupCredentials=‘false’
BEGIN
ROLLBACKTRANSACTION
RETURN 0x80630005
END
So that error is nothing to do with access being denied rather its that you haven’t supplied any group credentials.
The reason?
When supplying group credentials you need the following call:
Update-SPSecureStoreGroupCredentialMapping`
-Identity:$SecureStoreApplication`
-Values:$CredentialValues`
-Confirm:$false
Hope this helps.
Cheers
Sebastian