<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SharePoint Developer Support Team Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/feed.xml</link>
    <description>The Official blog of the SharePoint Developer Support Team</description>
    <lastBuildDate>Mon, 17 Dec 2018 19:47:19 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Fixing on the fly OAuth issue for Provider Hosted Add-in in GCC High or DOD Tenant</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/fixing-on-the-fly-oauth-issue-for-provider-hosted-add-in-in-gcc-high-or-dod-tenant</link>
      <pubDate>Wed, 31 Oct 2018 21:29:24 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2815</guid>
      <description><![CDATA[This post is a contribution from Mustaq Patel, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="float: none;background-color: transparent;color: #800000;font-family: 'Segoe UI',Tahoma,Arial,'Helvetica Neue',Helvetica,Sans-Serif;font-size: 14px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">This post is a contribution from Mustaq Patel, an engineer with the SharePoint Developer Support team</span>

<strong><span style="text-decoration: underline">Requirement:</span></strong> You have low trust Provider Hosted add-in that does <a href="https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/authorization-code-oauth-flow-for-sharepoint-add-ins">on the fly OAuth</a> (request permissions at runtime). You try to use this Provider Hosted add-in on a <a href="https://docs.microsoft.com/en-us/office365/servicedescriptions/office-365-platform-service-description/office-365-us-government/gcc-high-and-dod">GCC High or DoD</a> tenant. You see that the add-in does not work and you see an error message which seems to indicate that the add-in is looking for Client Id/Client Secret in wrong tenant.

<strong><span style="text-decoration: underline">Issue:</span></strong> when the add-in does <a href="https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/authorization-code-oauth-flow-for-sharepoint-add-ins">on the fly OAuth</a> the TokenHelper class that the add-in uses to get the OAuth process going and retrieve Access Token by validating Client Id and Client Secret in the Azure Active Directory, goes to a wrong AAD (i.e. public AAD) and will come back without any record matching with that Client Id and so the add-in fails. It is due to below hard coded string in the TokenHelper.cs file which is not valid for <a href="https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/authorization-code-oauth-flow-for-sharepoint-add-ins">on the fly OAuth</a> on GCC High/DOD tenants.
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> AcsHostUrl = <span style="color: #a31515">"accesscontrol.windows.net"</span>;
</pre>
</div>
To fix this modify this error line as below.
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> AcsHostUrl = <span style="color: #a31515;background-color: yellow">"login.microsoftonline.us"</span>;
</pre>
</div>
Also modify method GetAcsGlobalEndpointUrl as below.
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> GetAcsGlobalEndpointUrl()
{
    <span style="color: #0000ff">return</span> String.Format(CultureInfo.InvariantCulture, <span style="color: #a31515">"https://{0}/"</span>, AcsHostUrl);
}
</pre>
</div>
These 2 changes will fix the Provider Hosted add-in by causing the OAuth requests to go to correct authentication url for <a href="https://docs.microsoft.com/en-us/office365/servicedescriptions/office-365-platform-service-description/office-365-us-government/gcc-high-and-dod">GCCH</a> AAD.

If you are using same <span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">Provider Hosted add-in</span> for both <a href="https://docs.microsoft.com/en-us/office365/servicedescriptions/office-365-platform-service-description/office-365-us-government/gcc-high-and-dod">GCCH</a> and public cloud or want to maintain same code base for both types of cloud, than we have to do some extra work. The code logic would be to find out the top domain of the sharepoint site and if it is <em>.us</em> than go to <em>login.microsoftonline.us</em> and if it is <em>.com</em> go to <em>accesscontrol.windows.net.</em>

Below is the complete code change.
<ol>
 	<li>Declare 2 static variables as below (highlighted).
<div></div>
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> GlobalEndPointPrefix = <span style="color: #a31515">"accounts"</span>;
<span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> AcsHostUrl = <span style="color: #a31515">"accesscontrol.windows.net"</span>;
<span style="color: #0000ff;background-color: yellow">private </span><span style="color: #0000ff;background-color: yellow">static </span><span style="color: #2b91af;background-color: yellow">string</span><span style="background-color: yellow"> GCCHAcsHostUrl = </span><span style="color: #a31515;background-color: yellow">"login.microsoftonline.us"</span>;
<span style="color: #0000ff;background-color: yellow">private </span><span style="color: #0000ff;background-color: yellow">static </span><span style="color: #2b91af;background-color: yellow">string</span><span style="background-color: yellow">  SPTargetUrl = </span><span style="color: #a31515;background-color: yellow">""</span>;
</pre>
</div>
<div></div></li>
 	<li> Modify <em>GetAuthorizationUrl</em> to set <em>SPTargetUrl</em> as below
<div></div>
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> GetAuthorizationUrl(<span style="color: #2b91af">string</span> contextUrl, <span style="color: #2b91af">string</span> scope, <span style="color: #2b91af">string</span> redirectUri)
{
    <span style="background-color: yellow">SPTargetUrl = contextUrl;</span>
    <span style="color: #0000ff">return</span> <span style="color: #2b91af">string</span>.Format(
     <span style="color: #a31515">"{0}{1}?IsDlg=1&amp;client_id={2}&amp;scope={3}&amp;response_type=code&amp;redirect_uri={4}"</span>,
     EnsureTrailingSlash(contextUrl),
     AuthorizationPage,
     ClientId,
     scope,
     redirectUri);
}
</pre>
</div>
<div></div></li>
 	<li>Add below method, to get the top domain of the sharepoint url.
<div></div>
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> GetTopDomainType(Uri uri)
{
    <span style="color: #0000ff">if</span> (!uri.HostNameType.Equals(UriHostNameType.Dns) || uri.IsLoopback)
        <span style="color: #0000ff">return</span> <span style="color: #2b91af">string</span>.Empty; <span style="color: #008000">// or throw an exception            </span>
    <span style="color: #0000ff">return</span> String.Format(CultureInfo.InvariantCulture, <span style="color: #a31515">"{0}"</span>, uri.Host.Split(<span style="color: #a31515">'.'</span>).Last());
}
</pre>
</div>
<div></div></li>
 	<li> Modify <em>GetAcsGlobalEndpointUrl</em> as below, to find if SharePoint is in GCC High by checking top domain (<em>.us</em>)
<div></div>
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> GetAcsGlobalEndpointUrl()
{
    <span style="color: #2b91af">string</span> topDomain = GetTopDomainType(<span style="color: #0000ff">new</span> Uri(SPTargetUrl));
    <span style="color: #0000ff">if</span> (<span style="color: #2b91af">string</span>.Equals(topDomain, <span style="color: #a31515">"us"</span>, StringComparison.OrdinalIgnoreCase))
    {
        AcsHostUrl = GCCHAcsHostUrl;
        <span style="color: #0000ff">return</span> String.Format(CultureInfo.InvariantCulture, <span style="color: #a31515">"https://{0}/"</span>, AcsHostUrl);
    }
    <span style="color: #0000ff">else</span>
    {
        <span style="color: #0000ff">return</span> String.Format(CultureInfo.InvariantCulture, <span style="color: #a31515">"https://{0}.{1}/"</span>, GlobalEndPointPrefix, AcsHostUrl);
    }
}
</pre>
</div>
<div></div></li>
 	<li>Deploy the Provider Hosted add-in with this code change and test the add-in.
<div></div></li>
</ol>
Please note that from the Provider Hosted add-in, you have to call <em>GetAuthorizationUrl</em> method to construct the redirecturl for add-in consent.

For more details please refer below article
On the fly oauth - <a href="https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/authorization-code-oauth-flow-for-sharepoint-add-ins">https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/authorization-code-oauth-flow-for-sharepoint-add-ins</a>.
GCC high and DoD - <a href="https://docs.microsoft.com/en-us/office365/servicedescriptions/office-365-platform-service-description/office-365-us-government/gcc-high-and-dod">https://docs.microsoft.com/en-us/office365/servicedescriptions/office-365-platform-service-description/office-365-us-government/gcc-high-and-dod</a>.]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Online Authentication in Powershell for CSOM when Legacy Authentication is disabled for tenant or Multi Factor Authentication is enabled for user</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/sharepoint-online-authentication-in-powershell-for-csom-when-legacy-authentication-is-disabled-for-tenant-or-multi-factor-authentication-is-enabled-for-user</link>
      <pubDate>Sat, 27 Oct 2018 06:18:51 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2785</guid>
      <description><![CDATA[This post is a contribution from Sohail Sayed, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Sohail Sayed, an engineer with the SharePoint Developer Support team</span>

SharePoint Online Authentication in Powershell for CSOM when Legacy Authentication is disabled for tenant or Multi Factor Authentication is enabled for user
Authentication using SharePointOnlineCredentials class will work only if Legacy auth is enabled. If you tenant administrator has disabled Legacy Auth then SharePointOnlineCredentials will not be able to perform authentication. This also fails if the user account has Multi Factor authentication enabled. In this scenario you will be required to use Modern Authentication which uses OAuth. In powershell most SharePoint Online commandlets will be able to handle this scenario since Connect-SPOService command is able to handle this scenario. However if you authenticate successfully using Connect-SPOService command you cannot make CSOM class as we don’t get a Credentials object back from Connect-SPOService that can be used with the CSOM ClientContext class. You can work around this scenario using the OfficeDevPnP.Core.AuthenticationManager class. More details follow below.

<span style="text-decoration: underline"><strong>Checking if Legacy Auth is disabled</strong></span>
<ul>
 	<li>To check if legacy auth is disabled open SharePoint Online Management Shell.</li>
 	<li>Run the command “<em>Connect-SPOService -Url https://&lt;tenant&gt;-admin.sharepoint.com</em>”. Replace the &lt;tenant&gt; with your tenant name.</li>
 	<li>Enter credentials if prompted to authenticate.</li>
 	<li>Run the command “<em>Get-SPOTenant</em>”.</li>
 	<li>Check the property “<em>LegacyAuthProtocolsEnabled</em>”. If this is set to true then Legacy Authentication is enabled else disabled.
<a href="https://msdnshared.blob.core.windows.net/media/2018/10/authSPO_PS_Legacy_settings.png"><img width="446" height="76" class="alignnone size-full wp-image-2805" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/authSPO_PS_Legacy_settings.png" /></a></li>
</ul>
It could be possible that this is setting is set to true but Legacy Authentication is blocked via conditional access policies set by your tenant administrator. If conditional access policies are configured to block Legacy Authentication then you would be able to see an appropriate message in the network / fiddler trace for the endpoint https://login.microsoftonline.com/rst2.srf.
Below is an example of the response you will see in fiddler
<!-- HTML generated using hilite.me -->
<div style="background: #f0f0f0;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #062873;font-weight: bold">&lt;S:Fault&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;S:Code&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;S:Value&gt;</span>S:Sender<span style="color: #062873;font-weight: bold">&lt;/S:Value&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;S:Subcode&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;S:Value&gt;</span>wst:FailedAuthentication<span style="color: #062873;font-weight: bold">&lt;/S:Value&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;/S:Subcode&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;/S:Code&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;S:Reason&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;S:Text</span> <span style="color: #4070a0">xml:lang="en-US"</span><span style="color: #062873;font-weight: bold">&gt;</span>Authentication Failure<span style="color: #062873;font-weight: bold">&lt;/S:Text&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;/S:Reason&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;S:Detail&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;psf:error</span> <span style="color: #4070a0">xmlns:psf="https://schemas.microsoft.com/Passport/SoapServices/SOAPFault"</span><span style="color: #062873;font-weight: bold">&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;psf:value&gt;</span>0x80048823<span style="color: #062873;font-weight: bold">&lt;/psf:value&gt;&lt;psf:internalerror&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;psf:code&gt;</span>0x80048823<span style="color: #062873;font-weight: bold">&lt;/psf:code&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;psf:text&gt;</span>AADSTS53003: Blocked by conditional access.<span style="color: #062873;font-weight: bold">&lt;/psf:text&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;/psf:internalerror&gt;&lt;/psf:error&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;/S:Detail&gt;</span>
<span style="color: #062873;font-weight: bold">&lt;/S:Fault&gt;</span>
</pre>
</div>
Alternatively, Legacy Authentication is enabled and there are no Conditional access policies blocking the authentication but the SharePointOnlineCredentials still fails. This would be most likely due to Multi Factor Authentication on that user account. This can be easily verified by performing a login with that user account to the SharePoint site in the browser preferably an In-Private browsing session.

<span style="text-decoration: underline"><strong>Using the OfficeDevPnP.Core.AuthenticationManager to authenticate.</strong></span>
We need to download specific versions of assemblies for using the OfficeDevPnP.Core.AuthenticationManager class. You can get these from the Nuget package site.
<ul>
 	<li>download <a href="https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/16.1.7723.1200">https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/16.1.7723.1200</a> or higher version.</li>
 	<li>download <a href="https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/2.29.0">https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/2.29.0 </a></li>
 	<li>download <a href="https://www.nuget.org/packages/SharePointPnPCoreOnline/2.26.1805.1">https://www.nuget.org/packages/SharePointPnPCoreOnline/2.26.1805.1</a></li>
</ul>
Note once you go to the nuget url you will find the “Manual Download” link on the right.

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/authSPO_PS_Legacy_nuget.jpg"><img width="1526" height="656" class="alignnone size-full wp-image-2795" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/authSPO_PS_Legacy_nuget.jpg" /></a>

Download the file and rename to .zip extension.
Extract the contents on the zip files. We will be referencing this in the Powershell script.
The dlls can be found in /lib/net45 sub folder.

Code Example

Below is the code sample demonstrating using the <em>OfficeDevPnP.Core.AuthenticationManager </em>class for authentication.

<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #008000">#download https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/16.1.7723.1200</span>
[System.Reflection.Assembly]<span style="border: 1px solid #FF0000">::</span>LoadFile(<span style="color: #a31515">"C:\TEMP\microsoft.sharepointonline.csom.16.1.7723.1200\lib\net45\Microsoft.SharePoint.Client.dll"</span>)
[System.Reflection.Assembly]<span style="border: 1px solid #FF0000">::</span>LoadFile(<span style="color: #a31515">"C:\TEMP\microsoft.sharepointonline.csom.16.1.7723.1200\lib\net45\Microsoft.SharePoint.Client.Runtime.dll"</span>)
[System.Reflection.Assembly]<span style="border: 1px solid #FF0000">::</span>LoadFile(<span style="color: #a31515">"C:\TEMP\microsoft.sharepointonline.csom.16.1.7723.1200\lib\net45\Microsoft.SharePoint.Client.Taxonomy.dll"</span>)
<span style="color: #008000">#download https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/2.29.0</span>
[System.Reflection.Assembly]<span style="border: 1px solid #FF0000">::</span>LoadFile(<span style="color: #a31515">"C:\TEMP\microsoft.identitymodel.clients.activedirectory\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"</span>)
<span style="color: #008000">#download https://www.nuget.org/packages/SharePointPnPCoreOnline/2.26.1805.1</span>
[System.Reflection.Assembly]<span style="border: 1px solid #FF0000">::</span>LoadFile(<span style="color: #a31515">"C:\TEMP\sharepointpnpcoreonline.2.26.1805.1\lib\net45\OfficeDevPnP.Core.dll"</span>)

$siteUrl=https<span style="border: 1px solid #FF0000">:</span>//&lt;&lt;tenant&gt;&gt;.sharepoint.com

$authManager = new-object OfficeDevPnP.Core.AuthenticationManager<span style="border: 1px solid #FF0000">;</span>
$clientContext = $authManager.GetWebLoginClientContext($siteUrl)<span style="border: 1px solid #FF0000">;</span>
<span style="color: #008000">#testing CSOM calls</span>
$clientContext.Load($clientContext.Web)
$clientContext.ExecuteQuery()<span style="border: 1px solid #FF0000">;</span>
Write-Host $clientContext.Web.Title
</pre>
</div>
We are calling <em>$authManager.GetWebLoginClientContext($siteUrl);</em>. This return back a <em>ClientContext</em> object after authenticating successfully using Modern Authentication now.

Note that user will need to enter credential every time the powershell script executes in a new PowerShell console session. This approach is not feasible if you have a PowerShell script executing in background without user interaction like a scheduled task. In that case you need to use app only authentication approach using Client id and client secret.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Using Microsoft Graph API to convert the format of your documents</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/using-microsoft-graph-api-to-convert-the-format-of-your-documents</link>
      <pubDate>Fri, 26 Oct 2018 00:16:00 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2715</guid>
      <description><![CDATA[This post is a contribution from Jing Wang, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Jing Wang, an engineer with the SharePoint Developer Support team</span>

Many SharePoint Online customers want to convert their word documents or some other documents in SPO to pdf files programmatically.
Within SharePoint Online User Interface, you can convert them one at a time manually, but sometimes, users wish to have the ability to convert multiple documents automatically without having to open each document library, locate the documents and click through the options to do them one at a time.

With new Graph api endpoint listed below, above requirement can be automated with custom code, for example, C#, JavaScript…
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">GET /drive/items/{item-id}/content?format={format}
GET /drive/root:/<strong><em>{path and filename}</em></strong>:/content?format={format}
</pre>
</div>
Format options
The following values are valid for the format parameter:
<table border="1">
<tbody>
<tr>
<th>Format value</th>
<th>Description</th>
<th>Supported source extensions</th>
</tr>
<tr>
<td>pdf</td>
<td>Converts the item into PDF format.</td>
<td>csv, doc, docx, odp, ods, odt, pot, potm, potx, pps, ppsx, ppsxm, ppt, pptm, pptx, rtf, xls, xlsx</td>
</tr>
</tbody>
</table>
See details of the endpoint here:
<a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_get_content_format">https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_get_content_format</a>

Sample - Complete solution in C#:

<span style="text-decoration: underline"><em>Step I, Create a native app in Azure portal and give permissions, for Graph API.</em></span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-nativeapp-create.png"><img width="1006" height="825" class="alignnone size-full wp-image-2735" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-nativeapp-create.png" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/gprahAPI-pdf-nativeapp-configure.png"><img width="1713" height="658" class="alignnone size-full wp-image-2725" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/gprahAPI-pdf-nativeapp-configure.png" /></a>

&nbsp;

<span style="text-decoration: underline"><em>Step II. Create a Console Application, add two dlls and their references:</em></span>
DLLs:. These can be added as Nuget packages.
Microsoft.IdentityModel.Clients.ActiveDirectory.dll (Nuget Package Microsoft.SharePointOnline.CSOM)
Newtonsoft.Json.dll (Nuget Package Newtonsoft.Json)

Add the below using statements
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">using</span> Microsoft.IdentityModel.Clients.ActiveDirectory;
<span style="color: #0000ff">using</span> Newtonsoft.Json;
</pre>
</div>
Step III, Implement the code, with Graph Api to convert the document and download it locally and upload it back to SPO site:
Note: ADAL library is used for authentication.

Source code:
-------------------------------
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">using</span> Microsoft.IdentityModel.Clients.ActiveDirectory;
<span style="color: #0000ff">using</span> Newtonsoft.Json;
<span style="color: #0000ff">using</span> System;
<span style="color: #0000ff">using</span> System.Collections.Generic;
<span style="color: #0000ff">using</span> System.Linq;
<span style="color: #0000ff">using</span> System.Net.Http;
<span style="color: #0000ff">using</span> System.Net.Http.Headers;
<span style="color: #0000ff">using</span> System.Security.Cryptography.X509Certificates;
<span style="color: #0000ff">using</span> System.Text;
<span style="color: #0000ff">using</span> System.Threading.Tasks;
<span style="color: #0000ff">using</span> System.Net;
<span style="color: #0000ff">using</span> System.Security.Claims;
<span style="color: #0000ff">using</span> System.IO;
<span style="color: #0000ff">using</span> Microsoft.SharePoint.Client;
<span style="color: #0000ff">using</span> System.Security;


<span style="color: #0000ff">namespace</span> ConsoleApp1
{
    <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">class</span> <span style="color: #2b91af">StreamExtensions</span>
    {
        <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">byte</span>[] ReadAllBytes(<span style="color: #0000ff">this</span> Stream instream)
        {
            <span style="color: #0000ff">if</span> (instream <span style="color: #0000ff">is</span> MemoryStream)
                <span style="color: #0000ff">return</span> ((MemoryStream)instream).ToArray();

            <span style="color: #0000ff">using</span> (<span style="color: #2b91af">var</span> memoryStream = <span style="color: #0000ff">new</span> MemoryStream())
            {
                instream.CopyTo(memoryStream);
                <span style="color: #0000ff">return</span> memoryStream.ToArray();
            }
        }
    }
    <span style="color: #0000ff">class</span> <span style="color: #2b91af">Program</span>
    {
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> TENANT_NAME = <span style="color: #a31515">"mycompany.onmicrosoft.com"</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> resource = <span style="color: #a31515">"https://graph.microsoft.com"</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> loginname = <span style="color: #a31515">"user@mycompany.onmicrosoft.com"</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> loginpassword = <span style="color: #a31515">"*********"</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> AzureTenantID = <span style="color: #a31515">"********-f247-4d48-a45d-************"</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> spositeUrl = <span style="color: #a31515">"https://mycompany.sharepoint.com/*********"</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #2b91af">string</span> destinationDocumentLibrary = <span style="color: #a31515">"dl1"</span>; 

        <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> Main(<span style="color: #2b91af">string</span>[] args)
        {
            <span style="color: #008000">//USER TOKEN - THIS WORKS!!!!!!!!!!!!</span>
            UserPasswordCredential userPasswordCredential = <span style="color: #0000ff">new</span> UserPasswordCredential(loginname, loginpassword);
            <span style="color: #2b91af">var</span> graphauthority = <span style="color: #a31515">"https://login.microsoftonline.com/"</span> + AzureTenantID;
            AuthenticationContext authContext = <span style="color: #0000ff">new</span> AuthenticationContext(graphauthority);
            <span style="color: #2b91af">var</span> token = authContext.AcquireTokenAsync(resource, <span style="color: #a31515">"94b1544c-35e8-4d45-a941-c3dbaab283dc"</span>, userPasswordCredential).Result.AccessToken;

            <span style="color: #008000">// Create a new HttpWebRequest Object to the mentioned URL.</span>
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(<span style="color: #a31515">"https://graph.microsoft.com/v1.0/me/drive/root:/orange.docx:/content?format=pdf"</span>);
            <span style="color: #008000">//HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create("https://graph.microsoft.com/v1.0/drives/b!zMNDej1sNEG0SanRDltXfAVTYcdt1pdIggMBPYZYp9Wgdi3ir9sFQJXof6j8GNUD/root:/Repro.docx:/content?format=pdf");</span>
            myHttpWebRequest.AllowAutoRedirect = <span style="color: #0000ff">false</span>;
            myHttpWebRequest.Headers.Set(<span style="color: #a31515">"Authorization"</span>, (<span style="color: #a31515">"Bearer "</span> + token));
            HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
            <span style="color: #2b91af">string</span> downloadPath = myHttpWebResponse.GetResponseHeader(<span style="color: #a31515">"Location"</span>);
            Console.WriteLine(<span style="color: #a31515">"Download PDF file from here:\n "</span> + downloadPath);

            <span style="color: #008000">//Get the file Stream with Location Url</span>
            HttpWebRequest HttpWebRequest_download = (HttpWebRequest)WebRequest.Create(downloadPath);
            HttpWebRequest_download.Accept = <span style="color: #a31515">"blob"</span>;

            <span style="color: #2b91af">var</span> response = (HttpWebResponse)HttpWebRequest_download.GetResponse();
            Stream myStream = response.GetResponseStream();
            FileStream targetFile = <span style="color: #0000ff">new</span> FileStream(<span style="color: #a31515">"C:\\temp\\orange_converted_localcopy.pdf"</span>, FileMode.Create);
            myStream.CopyTo(targetFile);
            myStream.Close();                   
            response.Close();

<span style="color: #008000">//You can continue to use Graph API to upload document back to OneDrive or other SPO site</span>
<span style="color: #008000">//since we used loginname/password above already, we will use simple CSOM to upload file to another SPO site as quick demo</span>
            <span style="color: #0000ff">using</span> (<span style="color: #2b91af">var</span> clientContext = <span style="color: #0000ff">new</span> ClientContext(spositeUrl))
            {
                SecureString passWord = <span style="color: #0000ff">new</span> SecureString();
                <span style="color: #0000ff">foreach</span> (<span style="color: #2b91af">char</span> c <span style="color: #0000ff">in</span> loginpassword.ToCharArray()) passWord.AppendChar(c);

                clientContext.Credentials = <span style="color: #0000ff">new</span> SharePointOnlineCredentials(loginname, passWord);
                <span style="color: #2b91af">var</span> web = clientContext.Web;
                clientContext.Load(web);
                clientContext.ExecuteQuery();

                List dl = web.Lists.GetByTitle(destinationDocumentLibrary);
                clientContext.Load(dl);
                clientContext.ExecuteQuery();

                <span style="color: #008000">//Upload the converted file to SPO site</span>
                targetFile.Position = 0;               
                    <span style="color: #2b91af">var</span> fci = <span style="color: #0000ff">new</span> FileCreationInformation
                    {
                        Url = <span style="color: #a31515">"orange_converted_spocopy.pdf"</span>,
                        ContentStream = targetFile,
                        Overwrite = <span style="color: #0000ff">true</span>
                    };
                    Folder folder = dl.RootFolder;
                    FileCollection files = folder.Files;
                    Microsoft.SharePoint.Client.File file = files.Add(fci);
                    clientContext.Load(files);
                    clientContext.Load(file);
                    clientContext.ExecuteQuery();

                    targetFile.Close();
                    response.Close();            

                Console.WriteLine(<span style="color: #a31515">"Converted file is uploaded to SPO site - orange_converted_spocopy.pdf"</span>);
                Console.ReadKey();
            }
        }
       
    }
    }
</pre>
</div>
Here is the converted file downloaded locally.

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-downloaded.png"><img width="1766" height="507" class="alignnone size-full wp-image-2745" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-downloaded.png" /></a>

The converted pdf is also uploaded to this SPO site:

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-sharepoint-lib.png"><img width="2000" height="831" class="alignnone size-full wp-image-2755" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-sharepoint-lib.png" /></a>

In the process to generate the url for the Graph API endpoint, I found it kind of tricky to identify the drive ID for specific SPO site, so listing the approach to get the same.

First, Use following url format in Graph Explorer to retrieve the drive id:
https://graph.microsoft.com/v1.0/sites/[spositehostname]:/[sites/pub]:/drive

For example, if the SPO site url is:
https://mycompany.sharepoint.com/sites/testsite

Url to put in Graph Explorer is:
https://graph.microsoft.com/v1.0/sites/mycompany.sharepoint.com:/sites/testsite:/drive

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-graph-explorer.png"><img width="2024" height="1138" class="alignnone size-full wp-image-2765" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-graph-explorer.png" /></a>

Output has the drive id:
--
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #0000ff">{</span>
    <span style="color: #a31515">"@odata.context"</span>: <span style="color: #a31515">"https://graph.microsoft.com/beta/$metadata#drives/$entity"</span>,
    <span style="color: #a31515">"createdDateTime"</span>: <span style="color: #a31515">"2017-12-04T19:48:25Z"</span>,
    <span style="color: #a31515">"description"</span>: <span style="color: #a31515">"This system library was created by the Publishing feature to store documents that are used on pages in this site."</span>,
    <span style="color: #a31515">"id"</span>: <span style="color: #a31515">"b!zMNDej1sNEG0SanRDltXfAVTYcdt1pdIggMBPYZYp9Wgdi3ir9sFQJXof6j8GNUD"</span>,
    <span style="color: #a31515">"lastModifiedDateTime"</span>: <span style="color: #a31515">"2018-10-11T04:08:37Z"</span>,
    <span style="color: #a31515">"name"</span>: <span style="color: #a31515">"Documents"</span>,
    <span style="color: #a31515">"webUrl"</span>: <span style="color: #a31515">"https://mycompany.sharepoint.com/sites/****/Documents"</span>,
    <span style="color: #a31515">"driveType"</span>: <span style="color: #a31515">"documentLibrary"</span>,
    <span style="color: #a31515">"createdBy"</span>: {
        <span style="color: #a31515">"user"</span>: {
            <span style="color: #a31515">"displayName"</span>: <span style="color: #a31515">"System Account"</span>
        <span style="color: #0000ff">}</span>
  }
}
</pre>
</div>
I have a file named “Repro.docx” in the root of above drive:

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-demo-file.png"><img width="1670" height="982" class="alignnone size-full wp-image-2775" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/graphAPI-pdf-demo-file.png" /></a>

So the file’s conversion endpoint is:
https://graph.microsoft.com/v1.0/drives/b!zMNDej1sNEG0SanRDltXfAVTYcdt1pdIggMBPYZYp9Wgdi3ir9sFQJXof6j8GNUD/root:/Repro.docx:/content?format=pdf]]></content:encoded>
    </item>
    <item>
      <title>Get SPO sites with filter using SPOSitePropertiesEnumerableFilter</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/get-spo-sites-with-filter-using-spositepropertiesenumerablefilter</link>
      <pubDate>Wed, 24 Oct 2018 05:14:32 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2705</guid>
      <description><![CDATA[This post is a contribution from Aaron Miao, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Aaron Miao, an engineer with the SharePoint Developer Support team</span>

To get list of all OneDrive for Business sites of the tenant, with SharePoint Online Management Shell, run
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">Get-SPOSite -Template <span style="color: #a31515">"SPSPERS"</span>
</pre>
</div>
&nbsp;

This will return all OneDrive for Business sites.

It can be done with CSOM APIs as well. In fact, there’s class called <a href="https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.tenant.getsitepropertiesfromsharepointbyfilters.aspx">SPOSitePropertiesEnumerableFilter</a>. This class makes it easy specially to get all specific type of sites.

As seen, the class <a href="https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.tenant.getsitepropertiesfromsharepointbyfilters.aspx">SPOSitePropertiesEnumerableFilter</a> is included in
Namespace: <a href="https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.aspx">Microsoft.Online.SharePoint.TenantAdministration</a>
Assembly: Microsoft.Online.SharePoint.Client.Tenant (in Microsoft.Online.SharePoint.Client.Tenant.dll)
You can get assembly Microsoft.Online.SharePoint.Client.Tenant.dll from latest version of nuget package: <a href="https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM">Microsoft.SharePointOnline.CSOM</a>.

Code below shows how to use <a href="https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.tenant.getsitepropertiesfromsharepointbyfilters.aspx">SPOSitePropertiesEnumerableFilter</a> class to get different types of sites.

<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">using System<span style="border: 1px solid #FF0000">;</span>
using System.Collections.Generic<span style="border: 1px solid #FF0000">;</span>
using System.Security<span style="border: 1px solid #FF0000">;</span>
using Microsoft.SharePoint.Client<span style="border: 1px solid #FF0000">;</span>
using Microsoft.Online.SharePoint.TenantAdministration<span style="border: 1px solid #FF0000">;</span>

namespace GetAllSitesWithFilter
{
    class Program
    {
        static string TENANT = <span style="color: #a31515">"mytenant"</span><span style="border: 1px solid #FF0000">;</span>
        static string ADMINURL = <span style="color: #a31515">"https://"</span> + TENANT + <span style="color: #a31515">"-admin.sharepoint.com"</span><span style="border: 1px solid #FF0000">;</span>

        static void Main(string[] args)
        {
            //Specify tenant admin and site URL
            string adminUser = <span style="color: #a31515">"admin@"</span> + TENANT + <span style="color: #a31515">".onmicrosoft.com"</span><span style="border: 1px solid #FF0000">;</span>
            SecureString password = <span style="color: #a31515">"adminpassword"</span>.ConvertToSecureString()<span style="border: 1px solid #FF0000">;</span>
            SharePointOnlineCredentials adminCred = new SharePointOnlineCredentials(adminUser, password)<span style="border: 1px solid #FF0000">;</span>

            List&lt;SiteProperties&gt; list = new List&lt;SiteProperties&gt;()<span style="border: 1px solid #FF0000">;</span>

            SPOSitePropertiesEnumerable ssp = null<span style="border: 1px solid #FF0000">;</span>

            using (ClientContext cc = new ClientContext(ADMINURL))
            {
                cc.Credentials = adminCred<span style="border: 1px solid #FF0000">;</span>

                String nextIndex = null<span style="border: 1px solid #FF0000">;</span>
                Tenant tenant = new Tenant(cc)<span style="border: 1px solid #FF0000">;</span>

                SPOSitePropertiesEnumerableFilter sspFilter = new SPOSitePropertiesEnumerableFilter()
                {
                    // get personal sites
                    IncludePersonalSite = PersonalSiteFilter.Include,  // needed to <span style="color: #0000ff">for</span> personal sites
                    IncludeDetail = true,
                    Template = <span style="color: #a31515">"SPSPERS"</span>

                    // get classic team sites
                    //IncludeDetail = true,
                    //Template = <span style="color: #a31515">"STS"</span>

                    // get modern sites
                    //IncludeDetail = true,
                    //Template = <span style="color: #a31515">"GROUP"</span>

                    // get communication sites
                    //IncludeDetail = true,
                    //Template = <span style="color: #a31515">"SITEPAGEPUBLISHING"</span>
                }<span style="border: 1px solid #FF0000">;</span>

                <span style="color: #0000ff">do</span>
                {
                    sspFilter.StartIndex = nextIndex<span style="border: 1px solid #FF0000">;</span>
                    ssp = tenant.GetSitePropertiesFromSharePointByFilters(sspFilter)<span style="border: 1px solid #FF0000">;</span>

                    cc.Load(ssp)<span style="border: 1px solid #FF0000">;</span>
                    cc.ExecuteQuery()<span style="border: 1px solid #FF0000">;</span>

                    list.AddRange(ssp)<span style="border: 1px solid #FF0000">;</span>
                    nextIndex = ssp.NextStartIndexFromSharePoint<span style="border: 1px solid #FF0000">;</span>
                } <span style="color: #0000ff">while</span> (nextIndex != null)<span style="border: 1px solid #FF0000">;</span>
            }

            <span style="color: #0000ff">foreach</span>(SiteProperties siteProp <span style="color: #0000ff">in</span> list)
            {
                Console.WriteLine(string.Format(<span style="color: #a31515">"Site Url: {0} - Template: {1}"</span>, siteProp.Url, siteProp.Template))<span style="border: 1px solid #FF0000">;</span>
            }

        }
    }

    static class StringExtension
    {
        public static SecureString ConvertToSecureString(this string item)
        {
            <span style="color: #0000ff">if</span> (!string.IsNullOrEmpty(item))
            {
                var secureString = new SecureString()<span style="border: 1px solid #FF0000">;</span>
                <span style="color: #0000ff">foreach</span> (var c <span style="color: #0000ff">in</span> item)
                {
                    secureString.AppendChar(c)<span style="border: 1px solid #FF0000">;</span>
                }
                <span style="color: #0000ff">return</span> secureString<span style="border: 1px solid #FF0000">;</span>
            }
            <span style="color: #0000ff">return</span> null<span style="border: 1px solid #FF0000">;</span>
        }
    }
}
</pre>
</div>
As you can see, for getting all OneDrive sites, the filter can be set like this:
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">SPOSitePropertiesEnumerableFilter sspFilter = new SPOSitePropertiesEnumerableFilter()
{
  IncludePersonalSite = PersonalSiteFilter.Include,
  IncludeDetail = true,
  Template = <span style="color: #a31515">"SPSPERS"</span> // template name <span style="color: #0000ff">for</span> personal site
}<span style="border: 1px solid #FF0000">;</span>
</pre>
</div>
Note that <em>IncludePersonalSite = PersonalSiteFilter.Include</em> is needed to work with “<em>SPSPERS</em>” template filter. Without setting <em>IncludePersonalSite</em>, it returns no sites even if Template = "<em>SPSPERS</em>" is specified.
For getting all classic team sites,
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">SPOSitePropertiesEnumerableFilter sspFilter = new SPOSitePropertiesEnumerableFilter()
{
  IncludeDetail = true,
  Template = <span style="color: #a31515">"STS"</span>
}<span style="border: 1px solid #FF0000">;</span>
</pre>
</div>
For getting all modern team sites,
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">SPOSitePropertiesEnumerableFilter sspFilter = new SPOSitePropertiesEnumerableFilter()
{
  IncludeDetail = true,
  Template = <span style="color: #a31515">"GROUP"</span>
}<span style="border: 1px solid #FF0000">;</span>
</pre>
</div>
For getting all communication sites,

<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">SPOSitePropertiesEnumerableFilter sspFilter = new SPOSitePropertiesEnumerableFilter()
{
  IncludeDetail = true,
  Template = <span style="color: #a31515">"SITEPAGEPUBLISHING"</span>
}<span style="border: 1px solid #FF0000">;</span>
</pre>
</div>
Noticed that the sample code does not set Template filter like: Template = "STS#0". With or without “#0”, it returns same result.]]></content:encoded>
    </item>
    <item>
      <title>Use Excel Web Access Web Part to dynamically show a workbook</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/use-excel-web-access-web-part-to-dynamically-show-a-workbook</link>
      <pubDate>Thu, 18 Oct 2018 05:24:05 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2635</guid>
      <description><![CDATA[This post is a contribution from Mustaq Patel, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Mustaq Patel, an engineer with the SharePoint Developer Support team</span>

Requirement: In SharePoint online page, how to show excel workbook dynamically using JSLink without O365 Global Suite Navigation bar.

In SharePoint online we can use script or content editor webpart to show the excel workbook in an iframe. The script webpart can also contain jquery code to set the iframe’s src to the excel workbook dynamically using some business logic. Due to cross domain calls, we cannot write jquery or css to hide the global suite bar that Excel office web app loads in the iframe. So how to show excel workbook without global suite bar and still have workbook url set dynamically. This blog post will address this requirement.
We will use Excel Web Access Webpart and list view webpart. We will connect this 2 webparts, so the Excel Web Access Webpart receives the workbook url from list view webpart. We will also be using JSLink to filter items in the listview webpart, there by only files that meet particular criteria shows up in the list view webpart.
Below are the steps to demonstrate the solution:

Create a document library. Create a View Called “MyExcelFileView” and make sure to include “Created By” Field. You can include any other fields in this view. Upload few excel files under different user so “Created By “ field have different user.

Create a webpart page or use any existing wiki page. Edit the Page. Add 2 webparts in same order as below
<ol>
 	<li>List View Webpart showing all the files from document library where all workbook are present.
<ol type="a">
 	<li>Upload the javascript file from below to SiteAssets library. I have uploaded at below url SiteUrl/SiteAssets/POC_ListItemFiltering.js. I have also uploaded jquery at same location SiteUrl/SiteAssets/ jquery-1.9.1.js, you may refer the jquery from CDN as well and in that case, you don’t need to upload the jquery file.
<a href="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_siteassets.png"><img width="291" height="323" class="alignnone size-full wp-image-2645" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_siteassets.png" /></a></li>
 	<li>Edit this listview webpart and under Miscellaneous, set the JS Link property as below. If you are referring jquery from cdn, you can change below
~site/SiteAssets/jquery-1.9.1.js | ~site/SiteAssets/POC_ListItemFiltering.js</li>
 	<li>Set Appearance, layouts etc as per your needs, you can also set what view to show, to not take lot of space on the page. Select View “MyExcelFileView”. You may select any out of box view as well. Just make sure the field “Created By” is also part of the view.
<a href="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_webpartprop1.png"><img width="241" height="250" class="alignnone size-full wp-image-2655" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_webpartprop1.png" /></a></li>
 	<li>Once jslink works, it will filter and show workbooks for current logged in user.
<a href="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_lvwp1.png"><img width="790" height="165" class="alignnone size-full wp-image-2685" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_lvwp1.png" /></a></li>
</ol>
</li>
 	<li>The Page still in edit mode, add Excel Web Access webpart from Business Data. Edit its properties and make connection as below
<ol type="a">
 	<li>click Connections -&gt; Get Workbook Url from -&gt; above list view webpart -&gt; A connection setting popup will load. Select Field Name “Document URL” finish and save the excel webpart.</li>
 	<li>I have also uncheck both checkboxes in “Title Bar” and Type of ToolBar: “No ToolBar”.</li>
 	<li>Save the webpart. Save the page and publish, approve if required.</li>
</ol>
</li>
</ol>
The page should look as below, and you can see the first excel is already being loaded in the excel webpart. If you click that small icon in listview webpart to select another workbook, it will show in the excel webpart.

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_result1.png"><img width="1021" height="766" class="alignnone size-full wp-image-2695" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/excelwebaccess_result1.png" /></a>

Here is the javascript we used in the jslink.


<!-- HTML generated using hilite.me --><div style="background: #ffffff;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em"><pre style="margin: 0;line-height: 125%">Type.registerNamespace(<span style="color: #a31515">&#039;SSPXTesting&#039;</span>)
SSPXTesting.Disp = SSPXTesting.Disp || {};
SSPXTesting.Disp.Templates = SSPXTesting.Disp.Templates || {};
SSPXTesting.Disp.Functions = SSPXTesting.Disp.Functions || {};
<span style="color: #0000ff">var</span> currentUser = <span style="color: #0000ff">null</span>;    

<span style="color: #0000ff">function</span> getCurrentUser(siteurl)
{	    
    $.ajax({
        async: <span style="color: #0000ff">false</span>,
        headers: { <span style="color: #a31515">&quot;accept&quot;</span>: <span style="color: #a31515">&quot;application/json; odata=verbose&quot;</span> },
        method: <span style="color: #a31515">&quot;GET&quot;</span>,
        url: siteurl + <span style="color: #a31515">&quot;/_api/web/CurrentUser&quot;</span>,
        success: <span style="color: #0000ff">function</span> (data) { 
            currentUser = data.d;
        },
		error: <span style="color: #0000ff">function</span> (error) {
			console.log(<span style="color: #a31515">&#039;some error&#039;</span>);
			<span style="color: #008000">//alert(&quot;error:&quot; +error);</span>
		}
    });    
}

renderListItemTemplate = <span style="color: #0000ff">function</span> (renderCtx) {		
		<span style="color: #0000ff">var</span>	workbookname = <span style="color: #a31515">&quot;&quot;</span>;			
		<span style="color: #008000">//File_x0020_Type	&quot;xlsm&quot; or &quot;xlsx&quot;</span>
		<span style="color: #0000ff">var</span> filetype = renderCtx.CurrentItem[<span style="color: #a31515">&quot;File_x0020_Type&quot;</span>];
		<span style="color: #0000ff">var</span> fileAuthor = renderCtx.CurrentItem.Author;	
        <span style="color: #0000ff">if</span>(filetype == <span style="color: #a31515">&quot;xlsm&quot;</span> || filetype == <span style="color: #a31515">&quot;xlsx&quot;</span>) 
        {
			<span style="color: #0000ff">if</span>(!currentUser)
			{
				getCurrentUser(renderCtx.HttpRoot)
			}			
			<span style="color: #0000ff">if</span>(fileAuthor[0].email == currentUser.Email)
			{
				<span style="color: #0000ff">return</span> RenderItemTemplate(renderCtx);
			}
			<span style="color: #0000ff">else</span>
			{
				<span style="color: #008000">//return empty string</span>
				<span style="color: #0000ff">return</span> <span style="color: #a31515">&#039;&#039;</span>;
			}
        }
		<span style="color: #0000ff">else</span>
		{
			<span style="color: #008000">// return emtpy string</span>
			<span style="color: #0000ff">return</span> <span style="color: #a31515">&#039;&#039;</span>;  
		}        
}	

SSPXTesting.Disp.Templates.Item = renderListItemTemplate

SSPXTesting.Disp.Functions.RegisterField = <span style="color: #0000ff">function</span> () {
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(SSPXTesting.Disp)
}

SSPXTesting.Disp.Functions.MdsRegisterField = <span style="color: #0000ff">function</span> () {
    <span style="color: #0000ff">var</span> thisUrl = _spPageContextInfo.siteServerRelativeUrl + <span style="color: #a31515">&quot;/SiteAssets/POC_ListItemFiltering.js&quot;</span>;
    SSPXTesting.Disp.Functions.RegisterField();
    RegisterModuleInit(thisUrl, SSPXTesting.Disp.Functions.RegisterField)
};


<span style="color: #0000ff">if</span> (<span style="color: #0000ff">typeof</span> _spPageContextInfo != <span style="color: #a31515">&quot;undefined&quot;</span> &amp;&amp; _spPageContextInfo != <span style="color: #0000ff">null</span>) {
    SSPXTesting.Disp.Functions.MdsRegisterField();
}
<span style="color: #0000ff">else</span> {
    SSPXTesting.Disp.Functions.RegisterField();
}
</pre></div>
]]></content:encoded>
    </item>
    <item>
      <title>Fixing mixed content errors caused by Media Player web part on a https site collection on Internet Explorer (On Premise)</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/fixing-mixed-content-errors-caused-by-media-player-web-part-on-a-https-site-collection-on-internet-explorer-on-premise</link>
      <pubDate>Fri, 28 Sep 2018 04:39:10 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2625</guid>
      <description><![CDATA[This post is a contribution from Sohail Sayed, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Sohail Sayed, an engineer with the SharePoint Developer Support team</span>

<span style="color: #000000;font-family: Calibri">If you are using a Media Player web part on a SharePoint site over HTTPS you may see an error “The page at 'https://sp/Pages/Default.aspx' was loaded over HTTPS, but requested an insecure image 'https://download.microsoft.com/download/d/2/9/d29e5571-4b68-4d95-b43a-4e81ba178455/2.0/ENU/InstallSilverlight.png'. This content should also be served over HTTPS.</span>

<span style="color: #000000;font-family: Calibri">This error message is displayed when Silverlight is not installed on the System.</span>

<span style="color: #000000;font-family: Calibri">We ran into a scenario with a customer where they could not install Silverlight on the user’s machines and also had to avoid the mixed content error.</span>

<span style="color: #000000;font-family: Calibri">We tried a couple of options of hiding / removing the Silverlight prompt via CSS / JavaScript. However, the mixed content error seems to be thrown even before the DOM ready event happens so any modifications in CSS / JavaScript are too late. </span>

<span style="color: #000000;font-family: Calibri">After further research we found that SharePoint provides a configuration to control this. The Web Application has a configurable property “AllowSilverlightPrompt” that will control if the download Silverlight prompt can be loaded or not. By default, this is set to true. </span>

<span style="margin: 0px;line-height: 107%;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">We ran the below PowerShell to change this to false and this fixed the mixed content error message.</span></span>
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">$webApp = Get-SPWebApplication <span style="color: #a31515">"https://sp"</span>
$webApp.AllowSilverlightPrompt = $false
$webApp.Update()
</pre>
</div>
<span style="color: #000000;font-family: Calibri">Note that this is a server-side API and hence is applicable to SharePoint On-Premise only.</span>]]></content:encoded>
    </item>
    <item>
      <title>Problem of using TermStores.getByName()</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/problem-of-using-termstores-getbyname</link>
      <pubDate>Thu, 27 Sep 2018 22:38:05 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2595</guid>
      <description><![CDATA[This post is a contribution from Aaron Miao, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Aaron Miao, an engineer with the SharePoint Developer Support team</span>

We recently still see customers open support cases because code for fetching term store stopped working, especially from SharePoint Online customers.

Fetching term store by name is bad idea. The term store name is not actually persisted anywhere. It’s a calculated value and it changes. From the code like below, you probably can see the name of the term store passed to getByName() looks like a random value.

<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%"><span style="color: #2b91af">var</span> termStore = termStores.getByName(<span style="color: #a31515">"Taxonomy_Dmxzz8tIBzk8wNVKQpJ+xA=="</span>);
</pre>
</div>
The term store name could change due to various reasons, such as failover, tenant move, DB move, etc. events happened on SharePoint server side.

However, this is not your fault. There’re no published official documents on this. Even worse, SharePoint client-side APIs provide the getByName(). So, of course, customers start fetching their term store using that name in their custom code. Stop using getByName() method!

The correct way to fetch term store, like many good samples out there, is to use the following (CSOM) APIs are:

<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">TaxonomySession.GetDefaultSiteCollectionTermStore
TaxonomySession.GetDefaultKeywordsTermStore
</pre>
</div>
Both methods above return <a href="https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.taxonomy.termstore.aspx">TermStore</a> object. The DefaultSiteCollectionTermStore is a term store that has metadata local to the site collection, while the DefaultKeywordsTermStore is a global term store that contains enterprise keywords, as shown in <a href="https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.taxonomysession_members.aspx">TaxonomySession</a> class

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/getTermStoreByName-API.png"><img width="957" height="338" class="alignnone size-full wp-image-2605" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/09/getTermStoreByName-API.png" /></a>

Please be aware that both methods may return null value, as remarked in each API document, depends on your term store settings.

Here’re the JSOM APIs:

<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">getDefaultSiteCollectionTermStore
getDefaultKeywordsTermStore
</pre>
</div>
<a href="https://docs.microsoft.com/en-us/SharePoint/governance/managed-metadata-planning">This document</a> discusses difference between global and local (site collection specific) term stores.]]></content:encoded>
    </item>
    <item>
      <title>Create an OData data service for use as a BCS external system on SharePoint Online</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/create-an-odata-data-service-for-use-as-a-bcs-external-system-on-sharepoint-online</link>
      <pubDate>Thu, 02 Aug 2018 00:02:30 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2575</guid>
      <description><![CDATA[This post is a contribution from Jing Wang, an engineer with the SharePoint Developer Support...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Jing Wang, an engineer with the SharePoint Developer Support team</span>

Recently I worked with two customers who wanted to show their external data on SharePoint Online web sites, one from on-premise SQL Database and one from their secured internal data source.
They did not want to migrate their SQL Database to SQL Azure.

We researched for few possible options and chose the most feasible, easy to implement and secure solution - "Create custom OData WCF service accessing external data source and generate BDC external content type through SharePoint hosted Add-in.". Note this solution will also work for SharePoint On Premises but is especially suitable for SharePoint Online as we have some constraints on the kind of customization that can be done in SharePoint Online.

Here is the high level overview of the steps involved:

&nbsp;
<h4>Step I - Create an Internet-addressable ASP.NET Windows Communication Foundation (WCF) Data Service to expose the SQL database.</h4>
<a href="https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-an-odata-data-service-for-use-as-a-bcs-external-system">https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-an-odata-data-service-for-use-as-a-bcs-external-system</a>

Note: This article covers the steps before Visual Studio 2017.

If you use VS2017, it does not come with WCF Data Service by default, you need to install WCF Data Services Template for Visual Studio 2017: <a href="https://marketplace.visualstudio.com/items?itemName=CONWID.WcfDataServiceTemplateExtension#overview">https://marketplace.visualstudio.com/items?itemName=CONWID.WcfDataServiceTemplateExtension#overview</a>

WCF team also recommend to add a beta version of the WCF DataServices EntityProvider to your project: <a href="https://www.nuget.org/packages/Microsoft.OData.EntityFrameworkProvider/">https://www.nuget.org/packages/Microsoft.OData.EntityFrameworkProvider/</a>

Once the two things are installed, you can add WCF Data Service to the Project after you create ADO.NET Entity Data Model following the HowTo article above:
<ul>
 	<li>Add New Item and search for WCF</li>
 	<li>WCF Data Service 5.6.4</li>
</ul>
For Data Sources other than SQL Database, please refer to this article:

How to: Create a Data Service Using the Reflection Provider (WCF Data Services) -

<a href="https://docs.microsoft.com/en-us/dotnet/framework/data/wcf/create-a-data-service-using-rp-wcf-data-services">https://docs.microsoft.com/en-us/dotnet/framework/data/wcf/create-a-data-service-using-rp-wcf-data-services</a>

&nbsp;
<h4>Step II - Generate a Business Connectivity Services (BCS) external content type connecting to the OData WCF service above with SharePoint Hosted Add-in and extract the model file out:</h4>
<a href="https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-convert-an-add-in-scoped-external-content-type-to-tenant-scoped">https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-convert-an-add-in-scoped-external-content-type-to-tenant-scoped</a>

If you don’t want to expose your OData data service anonymously, you need to continue with Step III and Step IV, otherwise, skip to Step V directly.

&nbsp;
<h4>Step III - Create Target Application in SharePoint Central Admin site –Secure Store Service.</h4>
<a href="https://docs.microsoft.com/en-us/sharepoint/create-or-edit-secure-store-target-application?redirectSourcePath=%252fen-us%252farticle%252fcreate-or-edit-a-secure-store-target-application-f724dec2-ce28-4b76-9235-31728dce64b5">https://docs.microsoft.com/en-us/sharepoint/create-or-edit-secure-store-target-application?redirectSourcePath=%252fen-us%252farticle%252fcreate-or-edit-a-secure-store-target-application-f724dec2-ce28-4b76-9235-31728dce64b5</a>

&nbsp;
<h4>Step IV- Edit BDC model to use the Secure Store Target Application:</h4>
Highlighted lines are the ones you need to manually put in the model file.
-----------------------
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em">
<pre style="margin: 0;line-height: 125%">&lt;?xml <span style="color: #0000ff">version</span>=<span style="color: #a31515">"1.0"</span> encoding=<span style="color: #a31515">"utf-16"</span>?&gt;
&lt;Model xmlns:xsi=<span style="color: #a31515">"https://www.w3.org/2001/XMLSchema-instance"</span> xmlns:xsd=<span style="color: #a31515">"https://www.w3.org/2001/XMLSchema"</span> Name=<span style="color: #a31515;background-color: yellow">"BDCMetadata_AdventureWorks"</span> xmlns=<span style="color: #a31515">"https://schemas.microsoft.com/windows/2007/BusinessDataCatalog"</span>&gt;
&lt;LobSystems&gt;
&lt;LobSystem Name=<span style="color: #a31515">"adventureworks"</span> Type=<span style="color: #a31515">"OData"</span>&gt;
&lt;Properties&gt;
&lt;Property Name=<span style="color: #a31515">"ODataServiceMetadataUrl"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;http:<span style="color: #a31515">//</span>adventureworks.contoso.<span style="color: #0000ff">com</span><span style="color: #a31515">/WcfODataService_AdventureWorks.svc/</span>$metadata&lt;/Property&gt;
&lt;Property Name=<span style="color: #a31515">"ODataServiceMetadataAuthenticationMode"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;<span style="background-color: yellow">WindowsCredentials</span>&lt;/Property&gt;
&lt;Property Name=<span style="color: #a31515">"ODataServicesVersion"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;2.0&lt;/Property&gt;
<span style="background-color: yellow">&lt;Property Name=<span style="color: #a31515">"SsoApplicationId"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;SecureStoreTargentApplicationName&lt;/Property&gt;
&lt;Property Name=<span style="color: #a31515">"SsoProviderImplementation"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;Microsoft.Office.SecureStoreService.Server.SecureStoreProvider, Microsoft.Office.SecureStoreService, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&lt;/Property&gt;</span>
&lt;/Properties&gt;
…
&lt;LobSystemInstances&gt;
&lt;LobSystemInstance Name=<span style="color: #a31515">"adventureworks"</span>&gt;
&lt;Properties&gt;
&lt;Property Name=<span style="color: #a31515">"ODataServiceUrl"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;http:<span style="color: #a31515">//</span>adventureworks.contoso.<span style="color: #0000ff">com</span><span style="color: #a31515">/WcfODataService_AdventureWorks.svc&lt;/</span>Property&gt;
&lt;Property Name=<span style="color: #a31515">"ODataServiceAuthenticationMode"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;<span style="background-color: yellow">WindowsCredentials</span>&lt;/Property&gt;
&lt;Property Name=<span style="color: #a31515">"ODataFormat"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;application<span style="color: #a31515">/atom+xml&lt;/</span>Property&gt;
&lt;Property Name=<span style="color: #a31515">"HttpHeaderSetAcceptLanguage"</span> Type=<span style="color: #a31515">"System.Boolean"</span>&gt;true&lt;/Property&gt;
<span style="background-color: yellow">&lt;Property Name=<span style="color: #a31515">"SsoApplicationId"</span> Type=<span style="color: #a31515">"System.String"</span>&gt; SecureStoreTargentApplicationName&lt;/Property&gt;
&lt;Property Name=<span style="color: #a31515">"SsoProviderImplementation"</span> Type=<span style="color: #a31515">"System.String"</span>&gt;Microsoft.Office.SecureStoreService.Server.SecureStoreProvider, Microsoft.Office.SecureStoreService, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&lt;/Property&gt;</span>
&lt;/Properties&gt;
&lt;/LobSystemInstance&gt;
&lt;/LobSystemInstances&gt;
</pre>
</div>
&nbsp;
<h4>Step V - Import the External content type’s BDC model file to SPO BDC Service Application</h4>
To import the model file using SharePoint Central Administration pages
<ol>
 	<li>Open SharePoint Online or SharePoint on-premises Central Administration pages.</li>
 	<li>Choose Manage serve applications.</li>
 	<li>Choose Business Data Connectivity Service.</li>
 	<li>Choose the Import link on the server ribbon.</li>
 	<li>Choose the Browse button to specify the location where you extracted the .bdcm file.</li>
 	<li>Keep the default settings, and then choose Import.</li>
</ol>
&nbsp;
<h4>Step VI - Create External List from the External Content Type created above.</h4>
Here is a screen shot of the External List, showing the Microsoft sample AdventureWorks database – productInventory list:

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/BCS_SQL_SPO_ECT.png"><img width="1246" height="912" class="alignnone size-full wp-image-2585" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/08/BCS_SQL_SPO_ECT.png" /></a>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Error building the client side webparts behind corporate proxy</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/error-building-the-client-side-webparts-behind-corporate-proxy</link>
      <pubDate>Tue, 17 Jul 2018 04:10:55 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2565</guid>
      <description><![CDATA[This post is a contribution from Aravinda Devagiri, an engineer with the SharePoint Developer...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Aravinda Devagiri, an engineer with the SharePoint Developer Support team</span>
<br>
Recently I worked on a case, while trying to build simple Client Side webpart, when we run the gulp trust-dev-cert to install developer certificate (to preview the webpart) we get the error.

<!-- HTML generated using hilite.me --><div style="background: #ffffff;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em"><pre style="margin: 0;line-height: 125%">../gulp trust-dev-cert
 
Error<span style="border: 1px solid #FF0000">:</span> Cannot find module <span style="color: #a31515">&#039;@microsoft/sp-build-web&#039;</span>
    at <span style="color: #0000ff">Function</span>.Module._resolveFilename (module.js<span style="border: 1px solid #FF0000">:</span>527<span style="border: 1px solid #FF0000">:</span>15)
    at <span style="color: #0000ff">Function</span>.Module._load (module.js<span style="border: 1px solid #FF0000">:</span>476<span style="border: 1px solid #FF0000">:</span>23)
    at Module.require (module.js<span style="border: 1px solid #FF0000">:</span>568<span style="border: 1px solid #FF0000">:</span>17)
    at require (internal/module.js<span style="border: 1px solid #FF0000">:</span>11<span style="border: 1px solid #FF0000">:</span>18)
    at Object.&lt;anonymous&gt; (D<span style="border: 1px solid #FF0000">:</span>\bin\helloworld-webpart\gulpfile.js<span style="border: 1px solid #FF0000">:</span>4<span style="border: 1px solid #FF0000">:</span>15)
    at Module._compile (module.js<span style="border: 1px solid #FF0000">:</span>624<span style="border: 1px solid #FF0000">:</span>30)
    at Object.Module._extensions..js (module.js<span style="border: 1px solid #FF0000">:</span>635<span style="border: 1px solid #FF0000">:</span>10)
    at Module.load (module.js<span style="border: 1px solid #FF0000">:</span>545<span style="border: 1px solid #FF0000">:</span>32)
    at tryModuleLoad (module.js<span style="border: 1px solid #FF0000">:</span>508<span style="border: 1px solid #FF0000">:</span>12)
    at <span style="color: #0000ff">Function</span>.Module._load (module.js<span style="border: 1px solid #FF0000">:</span>500<span style="border: 1px solid #FF0000">:</span>3)
</pre></div>

The most probable reason could be that the you are working behind corporate proxy.
You have to setup node.js and get npm to work behind a proxy by setting the proxy and https-proxy settings.

Below are the commands to configure proxy setting for node.js.

<!-- HTML generated using hilite.me --><div style="background: #ffffff;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em"><pre style="margin: 0;line-height: 125%">npm config set proxy http<span style="border: 1px solid #FF0000">:</span>//proxyaddress.com<span style="border: 1px solid #FF0000">:</span>8080
npm config set https-proxy http<span style="border: 1px solid #FF0000">:</span>//proxyaddress.com<span style="border: 1px solid #FF0000">:</span>8080
</pre></div>

Create a new project with the Yeoman generator and then execute the cmd gulp trust-dev-cert and gulp serve to preview the webpart in local work bench.

If you still see the issue, you may have to check if you have the latest version of NodeJS using node -v. It should return the current LTS version.

Now create new project and before installing the developer certificate, run the cmd npm install to install the package and any other packages it depends on.

Here is the sequence of the cmds run to create the webpart.
<ul>
 	<li>md helloworld-webpart</li>
 	<li>cd helloworld-webpart</li>
 	<li>yo @microsoft/sharepoint</li>
 	<li>npm install</li>
 	<li>gulp trust-dev-cert</li>
 	<li>gulp serve</li>
</ul>
References:

<a href="https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part">https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part</a>
<a href="https://jjasonclark.com/how-to-setup-node-behind-web-proxy/">https://jjasonclark.com/how-to-setup-node-behind-web-proxy/</a>]]></content:encoded>
    </item>
    <item>
      <title>Remove SharePoint assets deployed as part of SharePoint Framework solution</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepointdevelopersupport/remove-sharepoint-assets-deployed-as-part-of-sharepoint-framework-solution</link>
      <pubDate>Tue, 17 Jul 2018 03:56:08 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Developer Support]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepointdevelopersupport/?p=2535</guid>
      <description><![CDATA[This post is a contribution from Aravinda Devagiri, an engineer with the SharePoint Developer...]]></description>
      <content:encoded><![CDATA[<span style="color: #800000">This post is a contribution from Aravinda Devagiri, an engineer with the SharePoint Developer Support team</span>

SharePoint assets can be provisioned as part of the SharePoint Framework solution and are deployed to SharePoint sites when the solution is installed on it. You can follow the article on how to provision assets as part of SharePoint Framework solution.
<a href="https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/provision-sp-assets-from-package">https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/provision-sp-assets-from-package</a>.

The following SharePoint assets can be provisioned along with your client-side solution package:
<ul>
 	<li>Fields</li>
 	<li>Content types</li>
 	<li>List instances</li>
 	<li>List instances with custom schema</li>
</ul>
I had to work on a case where these assets had to be removed on uninstalling the package, but we still see that the Content Types remained in the site. When tried to delete the Content Types, we get the below error.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/somethingwentwrong_removal.png"><img width="432" height="180" class="alignnone size-full wp-image-2545" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/somethingwentwrong_removal.png" /></a>

The solution package uses <a href="https://msdn.microsoft.com/en-us/library/ee537350(office.14).aspx">SharePoint Features</a> to package and provision the SharePoint items. When you navigate to the Site feature, you will find the feature activated which provisioned these assets. To remove the assets, we must deactivate this feature, this should remove the fields and content types provisioned.

Here is the order on how to remove assets deployed as part of SharePoint Framework package.
<ul>
 	<li>Remove the list from the site contents.</li>
 	<li>Delete them from the recycle bin, both from the first stage and second stage recycle bin.</li>
 	<li>Browse to "Site Settings" --&gt; "Manage site features" --&gt; Deactivate the custom feature that is installed through package and provisioned the assets.</li>
 	<li>You should find that the content types are removed for the Site content types.</li>
 	<li>You can remove the app without any issue and without any assets remaining in the site.</li>
</ul>
&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>