<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ole Kristian Mørch-Storstein</title>
    <description>The latest articles on DEV Community by Ole Kristian Mørch-Storstein (@okms).</description>
    <link>https://dev.to/okms</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F138739%2F8af7fa95-7533-4094-9a5d-7384c9f3da30.jpg</url>
      <title>DEV Community: Ole Kristian Mørch-Storstein</title>
      <link>https://dev.to/okms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/okms"/>
    <language>en</language>
    <item>
      <title>blog moved to GitHub pages</title>
      <dc:creator>Ole Kristian Mørch-Storstein</dc:creator>
      <pubDate>Mon, 14 Dec 2020 00:53:51 +0000</pubDate>
      <link>https://dev.to/okms/blog-moved-to-github-pages-41md</link>
      <guid>https://dev.to/okms/blog-moved-to-github-pages-41md</guid>
      <description>&lt;p&gt;I've moved the blog over to &lt;a href="https://okms.github.io/"&gt;GitHub pages&lt;/a&gt; the new url is &lt;a href="https://okms.github.io/"&gt;https://okms.github.io/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the few posts I have here have been migrated, but im leaving them here as well.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lookup field not returned in SharePoint REST</title>
      <dc:creator>Ole Kristian Mørch-Storstein</dc:creator>
      <pubDate>Sun, 29 Nov 2020 22:52:00 +0000</pubDate>
      <link>https://dev.to/okms/lookup-field-not-returned-in-sharepoint-rest-4h95</link>
      <guid>https://dev.to/okms/lookup-field-not-returned-in-sharepoint-rest-4h95</guid>
      <description>&lt;p&gt;Recently I reviewed a strange issue where a SharePoint document library had a Person/User field "Originator" which was impossible to access through REST. &lt;/p&gt;

&lt;h2&gt;
  
  
  TLDR
&lt;/h2&gt;

&lt;p&gt;if you add a person/user/lookup field named &lt;code&gt;Originator&lt;/code&gt;, you there will be no name collision when creating the field since there are no other field with the same internal name, but &lt;em&gt;accessing this field through REST cannot be done&lt;/em&gt; since SP REST &lt;em&gt;will&lt;/em&gt; have a name collision with an internal field due to the &lt;code&gt;&amp;lt;internal name&amp;gt;Id&lt;/code&gt; convention used by the API. &lt;/p&gt;

&lt;h2&gt;
  
  
  Details
&lt;/h2&gt;

&lt;p&gt;Here is my simple test case, a list with only two manually configured user (person) fields &lt;code&gt;Orignator&lt;/code&gt; as well as &lt;code&gt;AnotherUserField&lt;/code&gt;. The same user has been added both places&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZaUjwkxd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rzj44yilkfke4251vara.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZaUjwkxd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rzj44yilkfke4251vara.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First a bit of background. I assume the original field was created through the UI, with the title &lt;code&gt;Originator&lt;/code&gt;. This means the internal name aka static name for this field would be the same, i.e. &lt;code&gt;Originator&lt;/code&gt;. This does not conflict with any OOB fields, so creating it is straight forward.&lt;/p&gt;

&lt;p&gt;As this was a user field, its internally handled like any other lookup field. What this means is that the field is returned as &lt;code&gt;OriginatorId&lt;/code&gt; when you do a rest query. Well, that's the theory anyway. Lets have a look&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qQuPS7ML--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lj9fe20gt0wiq1fmzmz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qQuPS7ML--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lj9fe20gt0wiq1fmzmz3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can find my item title as well as &lt;code&gt;AnotherUserField&lt;/code&gt; which here is returned as &lt;code&gt;AnotherUserFieldId&lt;/code&gt; as expected. But no &lt;code&gt;OriginatorId&lt;/code&gt;. On a whim we pulled out the SchemaXml for the list, like so (my test list is aptly called 'test')&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Get-PnPList&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Identity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Includes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SchemaXml&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SchemaXml&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;clip&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we search through that text (preferably pretty printed) we find our &lt;code&gt;Originator&lt;/code&gt; field&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;Field&lt;/span&gt; &lt;span class="na"&gt;Type=&lt;/span&gt;&lt;span class="s"&gt;"User"&lt;/span&gt; &lt;span class="na"&gt;DisplayName=&lt;/span&gt;&lt;span class="s"&gt;"Originator"&lt;/span&gt; &lt;span class="na"&gt;List=&lt;/span&gt;&lt;span class="s"&gt;"UserInfo"&lt;/span&gt; &lt;span class="na"&gt;Required=&lt;/span&gt;&lt;span class="s"&gt;"FALSE"&lt;/span&gt; &lt;span class="na"&gt;EnforceUniqueValues=&lt;/span&gt;&lt;span class="s"&gt;"FALSE"&lt;/span&gt; &lt;span class="na"&gt;ShowField=&lt;/span&gt;&lt;span class="s"&gt;"ImnName"&lt;/span&gt; &lt;span class="na"&gt;UserSelectionMode=&lt;/span&gt;&lt;span class="s"&gt;"PeopleOnly"&lt;/span&gt; &lt;span class="na"&gt;UserSelectionScope=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;ID=&lt;/span&gt;&lt;span class="s"&gt;"{ef9f5a10-56dd-41e8-9e22-bfd095095ae0}"&lt;/span&gt; &lt;span class="na"&gt;SourceID=&lt;/span&gt;&lt;span class="s"&gt;"{4fb24039-a619-44e7-a2cf-2be13e015f4b}"&lt;/span&gt; &lt;span class="na"&gt;StaticName=&lt;/span&gt;&lt;span class="s"&gt;"Originator"&lt;/span&gt; &lt;span class="na"&gt;Name=&lt;/span&gt;&lt;span class="s"&gt;"Originator"&lt;/span&gt; &lt;span class="na"&gt;ColName=&lt;/span&gt;&lt;span class="s"&gt;"int4"&lt;/span&gt; &lt;span class="na"&gt;RowOrdinal=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But searching further for the word &lt;code&gt;Originator&lt;/code&gt; we found this internal hidden field which is added automatically to any list and required by some internal functionality in SPO, thus impossible to delete&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Field&lt;/span&gt; &lt;span class="na"&gt;ID=&lt;/span&gt;&lt;span class="s"&gt;"{14ee99cd-bed9-474a-bf99-8f753fbad6b4}"&lt;/span&gt; &lt;span class="na"&gt;Name=&lt;/span&gt;&lt;span class="s"&gt;"OriginatorId"&lt;/span&gt; &lt;span class="na"&gt;DisplaceOnUpgrade=&lt;/span&gt;&lt;span class="s"&gt;"TRUE"&lt;/span&gt; &lt;span class="na"&gt;Hidden=&lt;/span&gt;&lt;span class="s"&gt;"TRUE"&lt;/span&gt; &lt;span class="na"&gt;ReadOnly=&lt;/span&gt;&lt;span class="s"&gt;"TRUE"&lt;/span&gt; &lt;span class="na"&gt;ShowInFileDlg=&lt;/span&gt;&lt;span class="s"&gt;"FALSE"&lt;/span&gt; &lt;span class="na"&gt;Type=&lt;/span&gt;&lt;span class="s"&gt;"Lookup"&lt;/span&gt; &lt;span class="na"&gt;DisplayName=&lt;/span&gt;&lt;span class="s"&gt;"Originator Id"&lt;/span&gt; &lt;span class="na"&gt;List=&lt;/span&gt;&lt;span class="s"&gt;"Docs"&lt;/span&gt; &lt;span class="na"&gt;FieldRef=&lt;/span&gt;&lt;span class="s"&gt;"ID"&lt;/span&gt; &lt;span class="na"&gt;ShowField=&lt;/span&gt;&lt;span class="s"&gt;"OriginatorId"&lt;/span&gt; &lt;span class="na"&gt;JoinColName=&lt;/span&gt;&lt;span class="s"&gt;"DoclibRowId"&lt;/span&gt; &lt;span class="na"&gt;JoinRowOrdinal=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;JoinType=&lt;/span&gt;&lt;span class="s"&gt;"INNER"&lt;/span&gt; &lt;span class="na"&gt;SchemaVersion=&lt;/span&gt;&lt;span class="s"&gt;"16.0.77.0"&lt;/span&gt; &lt;span class="na"&gt;RecreateIfMissing=&lt;/span&gt;&lt;span class="s"&gt;"TRUE"&lt;/span&gt; &lt;span class="na"&gt;SourceID=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.microsoft.com/sharepoint/v3"&lt;/span&gt; &lt;span class="na"&gt;StaticName=&lt;/span&gt;&lt;span class="s"&gt;"OriginatorId"&lt;/span&gt; &lt;span class="na"&gt;FromBaseType=&lt;/span&gt;&lt;span class="s"&gt;"TRUE"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means, if you add a person/user/lookup field named &lt;code&gt;Originator&lt;/code&gt;, you there will be no name collision when creating the field since there are no other field with the same internal name, but &lt;em&gt;accessing this field through REST cannot be done&lt;/em&gt; since SP REST &lt;em&gt;will&lt;/em&gt; have a name collision with an internal field due to the &lt;code&gt;&amp;lt;internal name&amp;gt;Id&lt;/code&gt; convention used by the API. &lt;/p&gt;

&lt;p&gt;There's a bunch more of these names that are valid, but should be avoided, here are some which have names that do not start with underscore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prog&lt;/li&gt;
&lt;li&gt;Scope&lt;/li&gt;
&lt;li&gt;Unique&lt;/li&gt;
&lt;li&gt;ComplianceAsset&lt;/li&gt;
&lt;li&gt;SyncClient&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The simplest way to avoid this issue is to prefix internal names of your field. E.g. could the &lt;code&gt;Originator&lt;/code&gt; field have been created like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;Field&lt;/span&gt; &lt;span class="na"&gt;Type=&lt;/span&gt;&lt;span class="s"&gt;"User"&lt;/span&gt; &lt;span class="na"&gt;DisplayName=&lt;/span&gt;&lt;span class="s"&gt;"Originator"&lt;/span&gt; &lt;span class="na"&gt;List=&lt;/span&gt;&lt;span class="s"&gt;"UserInfo"&lt;/span&gt; &lt;span class="na"&gt;Required=&lt;/span&gt;&lt;span class="s"&gt;"FALSE"&lt;/span&gt; &lt;span class="na"&gt;EnforceUniqueValues=&lt;/span&gt;&lt;span class="s"&gt;"FALSE"&lt;/span&gt; &lt;span class="na"&gt;ShowField=&lt;/span&gt;&lt;span class="s"&gt;"ImnName"&lt;/span&gt; &lt;span class="na"&gt;UserSelectionMode=&lt;/span&gt;&lt;span class="s"&gt;"PeopleOnly"&lt;/span&gt; &lt;span class="na"&gt;UserSelectionScope=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;ID=&lt;/span&gt;&lt;span class="s"&gt;"{ef9f5a10-56dd-41e8-9e22-bfd095095ae0}"&lt;/span&gt; &lt;span class="na"&gt;SourceID=&lt;/span&gt;&lt;span class="s"&gt;"{4fb24039-a619-44e7-a2cf-2be13e015f4b}"&lt;/span&gt; &lt;span class="na"&gt;StaticName=&lt;/span&gt;&lt;span class="s"&gt;"OKMSOriginator"&lt;/span&gt; &lt;span class="na"&gt;Name=&lt;/span&gt;&lt;span class="s"&gt;"OKMSOriginator"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is, however, something you only would do if you created this field programmatically. Using the UI it is possible to create a field using the internal name you would like it to have, and then rename it, but this is not something regular users would ever do. &lt;/p&gt;

</description>
      <category>microsoft365</category>
      <category>sharepoint</category>
      <category>rest</category>
      <category>spfx</category>
    </item>
    <item>
      <title>Office Online 'The file is locked for shared use' error</title>
      <dc:creator>Ole Kristian Mørch-Storstein</dc:creator>
      <pubDate>Wed, 15 Jan 2020 15:18:52 +0000</pubDate>
      <link>https://dev.to/okms/office-online-the-file-is-locked-for-shared-use-error-15mh</link>
      <guid>https://dev.to/okms/office-online-the-file-is-locked-for-shared-use-error-15mh</guid>
      <description>&lt;h1&gt;
  
  
  Short breakdown
&lt;/h1&gt;

&lt;p&gt;After editing files in Office Online (Office 365 and OnPrem) in a chromium based browser you might experience the following: &lt;/p&gt;

&lt;p&gt;The file is locked for shared use by ...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xp8dwUJx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/87w5lhgv56z4mh22pcpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xp8dwUJx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/87w5lhgv56z4mh22pcpr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Background
&lt;/h1&gt;

&lt;p&gt;chromium based browsers all have the flag &lt;code&gt;allow-sync-xhr-in-page-dismissal&lt;/code&gt;. This flag can be found under&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Edge chromium: &lt;code&gt;edge://flags&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Chrome: &lt;code&gt;chrome://flags&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Recently it seems the default value for ths flag has been changed to &lt;a href="https://www.chromestatus.com/feature/4664843055398912"&gt;"disabled"&lt;/a&gt;. Furthermore this flag will be removed from both Chrome and &lt;a href="https://docs.microsoft.com/en-us/deployedge/microsoft-edge-policies#allowsyncxhrinpagedismissal"&gt;Edge&lt;/a&gt;. If this functionality is disabled, users will frequently experience issues where recently edited office documents are locked for editing by other users and metadata cannot be changed by the current user from the web interface. &lt;/p&gt;

&lt;p&gt;Office Online seems to rely on this functionality to unlock documents when you navigate away from the document editor interface. If not able to unlock a document, an exclusive lock will remain on the document until it expires after 30 minutes.&lt;/p&gt;

&lt;p&gt;If you cannot reproduce the error currently, you can try to change the flag to "disabled" and you should be able to consistently reproduce the error. &lt;/p&gt;

&lt;h1&gt;
  
  
  How to reproduce
&lt;/h1&gt;

&lt;p&gt;Note: use a chromium based browser&lt;/p&gt;

&lt;p&gt;1) in a document library, create a new document &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B_wQrCkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qxybkvd71vkzmuflsgy8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B_wQrCkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qxybkvd71vkzmuflsgy8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) edit the document if you like, return to the document library when done&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rC_Bzuhs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/r9u2ezjd7en8jbedlpxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rC_Bzuhs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/r9u2ezjd7en8jbedlpxv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) now try to add a title to your document&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eTJ3-eOJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xr2s8t6ytcxxdfkxi0mt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eTJ3-eOJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xr2s8t6ytcxxdfkxi0mt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) the file is locked for editing. Note that other users will not be able to edit the document at all since the current user will have an exclusive lock&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to make the teamify dialog re-appear in Office 365</title>
      <dc:creator>Ole Kristian Mørch-Storstein</dc:creator>
      <pubDate>Tue, 26 Mar 2019 15:38:38 +0000</pubDate>
      <link>https://dev.to/okms/how-to-make-the-teamify-dialog-re-appear-in-office-365-1ilm</link>
      <guid>https://dev.to/okms/how-to-make-the-teamify-dialog-re-appear-in-office-365-1ilm</guid>
      <description>&lt;p&gt;Here's a quick tip for those who have permanently dissmissed the "Teamify" site dialog in an Office365 group site.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ft6ra3p9zzs9qf101hwzf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ft6ra3p9zzs9qf101hwzf.jpg" title="The teamify dialog in all its glory" alt="Teamify dialog screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  PnP PowerShell snippet
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$siteUrl = "&amp;lt;full url to your site collection&amp;gt;"
# Show Teamify prompt again
$site = Get-PnPTenantSite -url $siteUrl 
# Temporarily disable NoScript
$site.DenyAddAndCustomizePages = [Microsoft.Online.SharePoint.TenantAdministration.DenyAddAndCustomizePagesStatus]::Disabled
$site.Update()
$site.Context.Load($site)
$site.Context.ExecuteQuery()

Connect-PnPOnline -Url $siteUrl
Remove-PnPPropertyBagValue -Key TeamifyHidden

# re-enable NoScript
$site.DenyAddAndCustomizePages = [Microsoft.Online.SharePoint.TenantAdministration.DenyAddAndCustomizePagesStatus]::Enabled
$site.Update()
$site.Context.ExecuteQuery()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The short version of what this script does is that it temporarily removes the NoScript limitation enforced on all group sites in Office 365. This is done so we can remove the "TeamifyHidden" propertybag value which is what controls whether or not the dialog should be visible. Finally we re-enable NoScript. &lt;/p&gt;

&lt;p&gt;For those who don't know, the teamify dialog allows you to create an Office 365 team attached to your existing group site. There are of course other ways of doing this, the most common being to attach your existing group site to a new Team through the Teams interface &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5yt3ihwr14jsibvucyy4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5yt3ihwr14jsibvucyy4.jpg" title="create a team from an existing site" alt="create a team from an existing site"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sharepoint</category>
      <category>office365</category>
    </item>
  </channel>
</rss>
