17.2.15
SharePoint App Dev Note
##Grab the cert and create the object##
$publicCertPath = "C:\vca-share.cer"
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($publicCertPath)
##Certificate treated as root authority##
New-SPTrustedRootAuthority -Name "HighTrustAppCert" -Certificate $certificate
##Setup token issuer which is the certificate itself##
$realm = Get-SPAuthenticationRealm
$specificIssuerId = [System.Guid]::NewGuid().ToString()
$specificIssuerId
$fullIssuerIdentifier = $specificIssuerId + '@' + $realm
New-SPTrustedSecurityTokenIssuer -Name "HighTrustAppCert" -Certificate $certificate -RegisteredIssuerName $fullIssuerIdentifier -IsTrustBroker
iisreset
$serviceConfig = Get-SPSecurityTokenServiceConfig
$serviceConfig.AllowOAuthOverHttp = $true
$serviceConfig.Update()
$specificIssuerId
http://{sharepoint}/_layouts/15/AppRegNew.aspx
New-SPSubscriptionSettingsServiceApplication -ApplicationPool "SharePoint Web Services Default" -Name "Subscription Settings Service Application" -DatabaseName "SubscriptionSettingsDB" | New-SPSubscriptionSettingsServiceApplicationProxy
New-SPSubscriptionSettingsServiceApplication -ApplicationPool "SharePoint Web Services Default" -Name "Subscription Settings Service Application" -DatabaseName "SubscriptionSettingsDB" | New-SPSubscriptionSettingsServiceApplicationProxy
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -Value "1" -PropertyType dword
$serviceConfig = Get-SPSecurityTokenServiceConfig$serviceConfig AllowOAuthOverHttp = $true $serviceConfig.Update()
http://sharepoint.stackexchange.com/questions/79284/getting-401-403-in-high-trust-app-for-sharepoint-2013
system.net tag:
<settings>
<servicePointManager
checkCertificateName=”false”
checkCertificateRevocationList=”false”/>
</settings>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment