0

I am doing CRUD operation using pnp.js in SharePoint site through custom page. I am able to perform all the actions in EDGE and Chrome browser.

But when I try to do the same in IE browser its not working.

Getting the error as 401.

I received Request header:

Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*Accept-Encoding: gzip, deflateAccept-Language: en-USAuthorization: NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAKAO5CAAAADw==Connection: Keep-AliveCookie: WSS_FullScreenMode=falseHost: portaldev.ibx.comIf-Modified-Since: Mon, 13 May 2019 12:09:39 GMTUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.3; Zoom 3.6.0) 

Response header:

Content-Length: 0
Date: Mon, 13 May 2019 12:13:30 GMT
MicrosoftSharePointTeamServices: 16.0.0.4822
request-id: 9934dc9e-a935-0049-b7d0-2c747ec5a0ba
Server: Microsoft-IIS/10.0
SPIisLatency: 0
SPRequestDuration: 1
SPRequestGuid: 9934dc9e-a935-0049-b7d0-2c747ec5a0ba
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgomiUcK1cn/yL0oAAAAAAAAAAIoAigBIAAAACgA5OAAAAA9MAEEATgBHAFIATwBVAFAAAgAQAEwAQQBOAEcAUgBPAFUAUAABABAAVwBTAFMAUABMAE4AMAAxAAQADgBpAGIAeAAuAGMAbwBtAAMAIABXAFMAUwBQAEwATgAwADEALgBpAGIAeAAuAGMAbwBtAAUAGABhAGQAZgBvAHIAZQBzAHQALgBjAG8AbQAHAAgAGR2VR4UJ1QEAAAAA
X-Content-Type-Options: nosniff
X-FRAME-OPTIONS: SAMEORIGIN
X-MS-InvokeApp: 1; RequireReadOnly
X-Powered-By: ASP.NET
3

Internet Explorer does not implement some of the ECMAScipt 6 types used in PnP.js. Because of this you need to use a couple ployfill libraries that implement the missing types. There are a few options on which polyfill libraries you can use, I use fetch and es6-promise.

Adding the following script elements to your page should get things working in Internet Explorer.

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.auto.js"></script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.