SharePoint Server 2016 Audience with MIM 2016 using “Memeber Of” AD group does not update.

To solve the problem: add new mapping, ADMA > Configure Attribute Flow, select Group, then sAMAccountName Direct Import to accountName.

Posted in SharePoint 2016, Tips | Leave a comment

Configure server-based authentication with Dynamics 365 Online and SharePoint on-premises.

1. Following the documentation

1.1. Configure SharePoint 2016 (Single-Server Farm)
1.2. Service applications after the configuration of the server:

1.3. SharePoint website must be accessible via the Internet. A reverse proxy may also be required for SharePoint authentication. More information: Configure a reverse proxy device for SharePoint Server 2016 hybrid

2. Azure
2.1 Get your Tenant ID
example: 12345678-0000-0000-0000-000000000000

2.2. Run the script
Enable-PSRemoting -force
Import-Module MSOnline -force
Import-Module MSOnlineExtended -force

$msolcred = get-credential
connect-msolservice -credential $msolcred

$HostName = "" - the created site in SharePoint (hosting the documents)
$SPOAppId = "00000003-0000-0ff1-ce00-000000000000"
$SPOContextId = (Get-MsolCompanyInformation).ObjectID
if don,t work
$SPOContextId = "TenantID"
$SharePoint = Get-MsolServicePrincipal -AppPrincipalId $SPOAppId
$ServicePrincipalName = $SharePoint.ServicePrincipalNames

Set-MsolServicePrincipal -AppPrincipalId $SPOAppId -ServicePrincipalNames $ServicePrincipalName

$metadataEndpoint = ""
$acsissuer = "00000001-0000-0000-c000-000000000000@TenantID"
$issuer = "00000007-0000-0000-c000-000000000000@TenantID"

New-SPAzureAccessControlServiceApplicationProxy -Name "Internal" -MetadataServiceEndpointUri $metadataEndpoint -DefaultProxyGroup

3. SharePoint 2016

3.1 Run the scripts:

Get-SPAuthenticationRealm # backup the GUID

Set-SPAuthenticationRealm -Realm "TenantID"

$metadataEndpoint = "" + "TenantID" + "/metadata/json/1"

$acsissuer = "00000001-0000-0000-c000-000000000000@" + "TenantID"
$issuer = "00000007-0000-0000-c000-000000000000@" + "TenantID"

New-SPAzureAccessControlServiceApplicationProxy -Name "ACS" -MetadataServiceEndpointUri $metadataEndpoint -DefaultProxyGroup

New-SPTrustedSecurityTokenIssuer –Name "ACS" –IsTrustBroker:$true –MetadataEndpoint $metadataEndpoint -RegisteredIssuerName $acsissuer

Get-SPTrustedSecurityTokenIssuer | Select RegisteredIssuername

$site = Get-SPSite ""

Register-SPAppPrincipal -site $site.RootWeb -NameIdentifier $issuer -DisplayName "Dynamics365"

$app = Get-SPAppPrincipal -NameIdentifier $issuer -Site ""

Set-SPAppPrincipalPermission -AppPrincipal $app -Site $site.Rootweb -Scope "sitecollection" -Right "FullControl"

$map1 = New-SPClaimTypeMapping -IncomingClaimType "" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming

3.2. Service applications after running the scripts:

3.3. In my case there was a change necessary in the user properties mapping in the User Profile Service Application + Full sync
(by default, the claims-based authentication mapping will use the user’s Microsoft account email address and the user’s SharePoint on-premises work email address for mapping. When you use this, the user’s email addresses must match between the two systems)

4. Dynamics 365
4.1. Uninstall CRM List component
4.2. Deactivate all sites remove absolute URLs, if existing
4.3. List component is installed should be checked (otherwise it will complain about absolute urls)
4.4. Enable Server-Based SharePoint IntegrationS

Check https://portal/sites/crmdocuments/_layouts/15/appprincipals.aspx

Posted in Dynamics 365, SharePoint 2016 | Leave a comment

Create a task to run a PowerShell script calling exe file.

Action: Start a program


Add arguments(optional):
-NoProfile -Executionpolicy bypass -file “C:\Scripts\StartBCSMetadataExe.ps1”

Posted in SharePoint 2010, SharePoint 2013, SharePoint 2016, Tips | Leave a comment

SharePoint Survey – branching jump to end – JQuery

<script .1.4.min.js" type="text/javascript" >
$(document).ready( function() {
var myinput = $("input[title*='Thank you for completing the survey.']");

Posted in SharePoint 2010, SharePoint 2013, SharePoint 2016 | 12 Comments

Recommended collation for SharePoint Latin1_General_CI_AS_KS_WS

The SQL Server collation must be configured for case-insensitive. The SQL Server database collation must be configured for case-insensitive, accent-sensitive, Kana-sensitive, and width-sensitive. This is to ensure file name uniqueness consistent with the Windows operating system.

Posted in SharePoint 2010, SharePoint 2013, SharePoint 2016, Tips | Leave a comment

Remove user from SharePoint 2013 Site Collection User List

You can do that from the following URL:



Posted in SharePoint 2010, SharePoint 2013, Tips | Leave a comment

Add a hyperlink in a SharePoint Survey

If you want to add a hyperlinks to a question with choices in SharePoint survey, you can use jquery. Edit the page add a Script Editor Webpart.

<script .1.4.min.js" type="text/javascript" >

$(document).ready( function() {
var myspan1 = $("span[title*='Big (17 inch)']");
myspan1.append('&nbsp;&nbsp;<a target="_blank" style="vertical-align:middle;color:#0072c6" href=""><b>%5BShow%5D</b></a>&#x27;);

var myspan2 = $("span[title*='Small (13 inch)']");
myspan2.append('&nbsp;&nbsp;<a target="_blank" style="vertical-align:middle;color:#0072c6" href=""><b>%5BShow%5D</b></a>&#x27;);

Posted in SharePoint 2010, SharePoint 2013 | Leave a comment