SharePoint On-Prem
33 TopicsGathering a SAML token using Edge or IE Developer tools
Every once in a while you will find that you cannot install the Fiddler application and you need to quickly grab the SAML token to help troubleshoot a SAML authentication issue. Below are the steps to gather the SAML token using Microsoft Edge or IE Developer tools.48KViews1like4CommentsSharePoint 2013/2016/2019: How to replace expired WorkFlow Manager Certificates
SharePoint 2013/2016/2019: How to replace expired WorkFlow Manager Certificates Having trouble with your SharePoint 2013-based workflows because your Workflow Manager certificates expired? Here is how you can fix this scenario...42KViews3likes4CommentsHow to disable the modern experience in SharePoint 2019
SharePoint 2019 delivers an updated modern look and feel for lists and libraries and enabled by default. However, if the classic experience is required for your farm, the modern experience can be disabled by Administrators.33KViews5likes4CommentsSharePoint fails to create Configuration Database for a new farm
SharePoint fails to create Configuration Database for a new farm with exception "Microsoft.SharePoint.Upgrade.SPUpgradeException: One or more types failed to load. Please refer to the upgrade log for more details."32KViews5likes6CommentsSharePoint Online: News from associated sites are not displayed in the hub News Webpart
Summary I recently worked on a case where News from associated sites are not displayed in the hub News Webpart. This took several months to resolve due to the complexity of hub news webpart and how it integrates with the Search Engine to retrieve and display news from the associated sites. Before getting into the problem, just providing a quick example of the News webpart configuration with a Hub Site. Hub Site Example: The following image shows a Hub site named “hubsite” and 2 associated sites (“hubsitechild1” and hubsitechild2”) Posting News items from the Hub: This is what the News Webpart looks like from the root Hub Site: Now let’s look at a child site: By default, the News Webpart will only show news from the current site: Site Admins will need to change this Webpart to view news from the Hub or any associated Hub site. In this example I will choose the “Hubsite”. With this configuration “Hubsitechild1” will display News posts from the Hub site Note: Since the retrieval of the new posts are based on search, you will not see new posts show up in the news webpart for about 5-15 minutes. How does it work? The News Webpart triggers a request to the SP Home Microservice with “DepartmentID” Example: https://sphome_base_url/api/v1/news/hub/filtered?departmentId=47060b5d-eb3a-4f7b-a1c0-421fc86cd0f6&start=0&count=13 Note: The DepartmentID will be the Site ID of the root hub site. The SP Home Micrososervice then calls the Search service with “ContentTypeId”, “PromotedState”, “DepartmentId” to retrieve the News items. Example: GET: https://tenant.sharepoint.com/search/_api/search/query?querytext='(*)'&QueryTemplate='PromotedState:2 AND ContentTypeId:0x0101009D1CB255DA76424F860D91F20E6C4118* AND (DepartmentId:47060b5d-eb3a-4f7b-a1c0-421fc86cd0f6 OR DepartmentId:{47060b5d-eb3a-4f7b-a1c0-421fc86cd0f6})'&Properties='ClientFunction:HubNewsArticles ,EnableDynamicGroups:True'&ClientType='SPHomePagesWeb'&SelectProperties='DocID,Path,DocID,SiteID,NormSiteId,WebID,NormWebId,GroupID,Title,Description,PictureThumbnailURL,AuthorOWSUSER,SiteTitle,SPSiteUrl,SiteLogo,PromotedState,FirstPublishedDate,UniqueId,ViewCountLifetime,SiteTemplate,IsExternalContent,SPWebUrl,ContentTypeId,Language,Color,ListItemID,DepartmentId'&SourceId='8413cd39-2156-4e00-b54d-11efd9abdb89'&Sortlist='FirstPublishedDate:1'&BypassResultTypes=true&TrimDuplicates=true&EnableQueryRules=false&EnableSorting=true&StartRow=0&RowLimit=13 The Search results are sent back to the News Webpart and displayed as configured. However, in the case that I was working, the Webpart was not displaying any news, even though the Search request was correct. Cause We found that the default Search Schema had been modified either manually or by a 3 rd party product. In this case the managed property “ AuthorOWSUSER” is used to locate News items. If the value of this property is unexpected or NULL, Hub News items will not be displayed within the Webpart. Here is the default setting for the “AuthorOWSUSER “managed property. As you can see there are 2 crawled properties by default. ows_q_USER__AuthorByline ows_q_USER_Author If either one of these crawled properties are missing, Hub News will not be displayed. Also, we found that in some cases there is a new managed property that uses “AuthorOWSUSER” as an alias. Resolution To resolve this issue, simply fix the modified search schema, which can be modified at the tenant level or the site collection level . The AuthorOWSUSER property exists at both tenant level and site level. How do we reach tenant level settings? Copy this URL and open in the new tab where tenant admin is already signed in https://admin.microsoft.com/sharepoint?page=classicfeatures&modern=true. Under Search, select Open. Select Manage Search Schema on the search administration page. How do we reach site level settings? On one of your affected hub sites, select Settings, and then select Site Settings. If you don't see Site settings, select Site information, and then select View all site settings. Under Site Collection Administration, select Search Schema. At this point your URL should look like this https://TENANT-NAME.sharepoint.com/sites/Hub-SITE-NAME/_layouts/15/listmanagedproperties.aspx?level=sitecol After opening the managed properties list at the tenant/hub site level: 1. Search for “AuthorOWSUSER” 2. You see all matches, including any custom managed properties that set AuthorOWSUSER as an alias. 3. Locate the problematic Managed property and correct the issue by deleting the property or changing the alias. In this example, I will change the alias of “Thiswillbreaknews”. 4. Make sure AuthorOWSUSER is mapped to “ows_q_USER__AuthorByline” and “ows_q_USER_Author”, if the mapping is incorrect, fix it. Please Note: Since these some of these properties are used in real-time, the problem should be resolved almost immediately. In a worst-case scenario, you will have to re-index the site , wait for Search to complete (about 15 minutes), then re-create the News Webpart. Steps to Re-index the site: On the hub site site, select Settings and then select Site settings. If you don't see Site settings, select Site information, and then select View all site settings. Under Search, click Search and offline availability. In the Reindex site section, click Reindex site. More Information For additional reading on the topics discussed in this blog see the following articles. What is a SharePoint hub site? Create a hub site in SharePoint Use the News web part on a SharePoint page Manage the search schema in SharePoint Online Manually request crawling and re-indexing of a site, a library or a list15KViews4likes1CommentInstall SMTP Server and Telnet with PowerShell
Summary SharePoint and general app servers often use the SMTP Service to integrate e-mail into the systems functionality. Since Windows supports a well vetted SMTP Service, using the built-in application is often the best choice. With the said, when testing your app functionality with e-mail, Telnet is almost always needed and not installed by default. If you find yourself always rebuilding servers to test new features and functionality, you may install SMTP and Telnet manually each time. If this is the case, why not use PowerShell? What does the script do? If SMTP is not installed, the installation will proceed. Once completed, it will then detect if Telnet is already installed. If not, you will be asked if Telnet should be installed. If you run the script a server with SMTP or Telnet already installed, the app installation will be detected and skipped. I'm hoping this script will make your test builds quicker and more enjoyable in the future. The Script: # Check if SMTP is installed before installing it. $smtp = get-WindowsFeature "smtp-server" if(!$smtp.Installed){ write-host "SMTP is not installed, installing it..." -ForegroundColor red add-WindowsFeature $smtp } else{ write-host "SMTP is already installed!" -ForegroundColor Cyan sleep 2 } # Once SMTP is installed, prompt to install Telnet, if not installed. $telnet = get-WindowsFeature "telnet-client" if(!$telnet.Installed){ #Use a popup windows with a yes or no choice $shell = new-object -comobject "WScript.Shell" $choice = $shell.popup("Telnet is not installed, do you want to install it?",0,"Install Telnet",4+32) } else{ write-host "Telnet is already installed, done!" -ForegroundColor Green break } #If you get here telnet is not installed and the user choose Yes. if ($choice -eq "6"){ write-host "Installing Telnet..." -ForegroundColor Green Add-WindowsFeature $telnet write-host "Done!" -ForegroundColor Cyan } #If you got here telnet is not installed but the user chose No. if ($choice -eq "7" -and !$telnet.Installed){ write-host "Telnet is not installed and will not be installed!" -ForegroundColor Green break } The Output: Here is what you will see if SMTP and Telnet is not installed: Windows Popup asking if Telnet should be installed: Installing Telnet: Done: If SMTP and Telnet is already installed it be detected and skip the installation:13KViews0likes2Comments