%3CLINGO-SUB%20id%3D%22lingo-sub-1491013%22%20slang%3D%22en-US%22%3ESharePoint%20provider%20hosted%20add-ins%20stop%20working%20in%20Safari%2013.1%20browser%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491013%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EThe%20Problem%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EWhen%20using%20the%20new%20Safari%2013.1%20browser%20with%20Intelligent%20Tracking%20Prevention%20(ITP)%2C%203rd%20party%20cookies%20are%20not%20allowed%20by%20default%20to%20remove%20the%20ability%20for%20websites%20to%20track%20you%20using%20cookies.%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EWhen%20an%20iframe%20is%20hosted%20in%20a%20page%2C%20it's%20cookies%2C%20even%20if%20they%20are%20for%20the%20origin%20in%20the%20frame%20are%20considered%203rd%20party%20if%20it%20is%20hosted%20in%20a%20page%20that%20is%20a%20different%20origin.%20This%20causes%20the%20cookies%20set%20for%20the%20SharePoint%20add-in%20webpart%20model%20to%20not%20be%20sent%20on%20subsequent%20requests%2C%20including%20the%20authentication%20cookie%20(fedauth).%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EThe%20Solution%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EThere%20is%20a%20solution%20to%20this%20by%20adding%20some%20code%20to%20request%20access%20to%20these%20cookies%20via%20a%20storage%20access%20API%20that%20has%20been%20implemented%20in%20Safari%2C%20and%20Firefox%2C%20as%20well%20as%20browsers%20based%20on%20their%20respective%20projects%20(webkit%20and%20mozilla)%20and%20has%20experimental%2Ffuture%20support%20in%20Chrome%20and%20Edge%20(chromium)%20as%20well.%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EThis%20script%20code%20will%20allow%20you%20to%20request%20access%20to%20the%203rd%20party%20cookies-%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%20color%3A%20%236a9955%3B%22%3E%2F%2Fcheck%26nbsp%3Bif%26nbsp%3Bthe%26nbsp%3Bfunction%26nbsp%3B'hasStorageAccess()'%26nbsp%3Bexists%26nbsp%3Bon%26nbsp%3Bthe%26nbsp%3Bdocument%26nbsp%3Bobject%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%20color%3A%20%236a9955%3B%22%3E%2F%2Fthis%26nbsp%3Blets%26nbsp%3Byou%26nbsp%3Bknow%26nbsp%3Bthat%26nbsp%3Bthe%26nbsp%3Bstorage%26nbsp%3Baccess%26nbsp%3BAPI%26nbsp%3Bis%26nbsp%3Bthere%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23c586c0%3B%22%3Eif%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Eundefined%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B!%3D%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Edocument%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3EhasStorageAccess%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E)%7B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Evar%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Epromise%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Edocument%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23989875%3B%22%3EhasStorageAccess%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E()%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Epromise%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23989875%3B%22%3Ethen%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E(%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Efunction%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B(%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3EhasAccess%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%236a9955%3B%22%3E%2F%2F%26nbsp%3BBoolean%26nbsp%3BhasAccess%26nbsp%3Bsays%26nbsp%3Bwhether%26nbsp%3Bthe%26nbsp%3Bdocument%26nbsp%3Bhas%26nbsp%3Baccess%26nbsp%3Bor%26nbsp%3Bnot.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Edocument%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23989875%3B%22%3ErequestStorageAccess%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E()%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%20color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%2C%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Efunction%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B(%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Ereason%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%236a9955%3B%22%3E%2F%2F%26nbsp%3BPromise%26nbsp%3Bwas%26nbsp%3Brejected%26nbsp%3Bfor%26nbsp%3Bsome%26nbsp%3Breason.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2347b7a0%3B%22%3EConsole%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23989875%3B%22%3Elog%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22Storage%26nbsp%3Brequest%26nbsp%3Bfailed%3A%26nbsp%3B%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%2B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Ereason%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%20color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%20color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B)%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%20color%3A%20%23979797%3B%22%3E%7D%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EIf%20you%20have%20a%20SharePoint%20add-in%20that%20is%20running%20in%20an%20iframe%20in%20a%20SharePoint%20page%2C%20then%20you%20would%20add%20the%20above%20code%20to%20your%20provider%20hosted%20page.%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EIf%20you%20run%20into%20problems%20with%20cookies%2C%20or%20authentication%20that%20only%20seem%20to%20affect%20the%20Safari%20browser%2C%20you%20can%20confirm%20that%20ITP%20is%20causing%20the%20issue%20by%20disabling%20the%20feature%20that%20is%20blocking%20third%20party%20cookies%20called%20Intelligent%20Tracking%20Protection%20(ITP).%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3ETo%20disable%20this%20setting%2C%20navigate%20to%3A%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EPreferences%3C%2FSPAN%3E%20-%26gt%3B%20%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EPrivacy%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EThen%20uncheck%20the%20%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EPrevent%20cross-site%20tracking%3C%2FSPAN%3E%20option.%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EDisabling%20the%20feature%20for%20normal%20use%20is%20not%20recommended%2C%20as%20it%20is%20a%20security%20measure%20that%20is%20designed%20to%20block%20malicious%20scripts.%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EFuture%20development%20testing%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EIf%20you%20are%20developing%20a%20new%20SharePoint%20provider%20hosted%20add-in%20or%20an%20SPFx%20add-in%20that%20uses%20content%20in%20an%20iframe%20or%20calls%20to%20a%203rd%20party%20site%20(with%20another%20domain)%20then%20you%20can%20test%20the%20script%20above%20by%20turning%20on%20the%20Storage%20Access%20API%20feature%20in%20the%20experimental%20features.%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EIn%20the%20MS%20Edge%20(chromium)%20browser%20use%20this%20URL-%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E-ERR%3AREF-NOT-FOUND-edge%3A%2F%2Fflags%2F%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EIn%20Chrome%2C%20use%20this%20URL-%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CA%20href%3D%22chrome%3A%2F%2Fflags%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Echrome%3A%2F%2Fflags%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EFind%20and%20enable%20the%20'Storage%26nbsp%3BAccess%20API'%20feature%20to%20enable%20the%20method%20used%20by%20the%20script.%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EThere%20will%20likely%20be%20some%20updates%20here%20to%20clarify%20behavior.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1491013%22%20slang%3D%22en-US%22%3E%3CP%3EAfter%20updating%20Safari%20browsers%20to%2013.1%2C%20a%20new%20feature%20is%20causing%20some%20authentication%20for%20Internet%20applications%20to%20break.%20SharePoint%20provider%20hosted%20add-ins%20are%20affected%20by%20this%20change%2C%20and%20require%20a%20small%20code%20modification%20added%20to%20the%20page%20for%20it%20to%20work%20as%20a%20provider%20hosted%20web%20part%20(in%20an%20iframe%20element).%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

The Problem

When using the new Safari 13.1 browser with Intelligent Tracking Prevention (ITP), 3rd party cookies are not allowed by default to remove the ability for websites to track you using cookies.

When an iframe is hosted in a page, it's cookies, even if they are for the origin in the frame are considered 3rd party if it is hosted in a page that is a different origin. This causes the cookies set for the SharePoint add-in webpart model to not be sent on subsequent requests, including the authentication cookie (fedauth).

 

The Solution

There is a solution to this by adding some code to request access to these cookies via a storage access API that has been implemented in Safari, and Firefox, as well as browsers based on their respective projects (webkit and mozilla) and has experimental/future support in Chrome and Edge (chromium) as well.

 

This script code will allow you to request access to the 3rd party cookies-

 

//check if the function 'hasStorageAccess()' exists on the document object

//this lets you know that the storage access API is there

if(undefined !== document.hasStorageAccess){

    var promise = document.hasStorageAccess();

    promise.then(

        function (hasAccess) {

            // Boolean hasAccess says whether the document has access or not.

            document.requestStorageAccess()

            },

        function (reason) {

            // Promise was rejected for some reason.

            Console.log("Storage request failed: " + reason);

        }

    );

}

 

If you have a SharePoint add-in that is running in an iframe in a SharePoint page, then you would add the above code to your provider hosted page.

 

If you run into problems with cookies, or authentication that only seem to affect the Safari browser, you can confirm that ITP is causing the issue by disabling the feature that is blocking third party cookies called Intelligent Tracking Protection (ITP).

To disable this setting, navigate to:

Preferences -> Privacy

Then uncheck the Prevent cross-site tracking option.

Disabling the feature for normal use is not recommended, as it is a security measure that is designed to block malicious scripts.

 

Future development testing

If you are developing a new SharePoint provider hosted add-in or an SPFx add-in that uses content in an iframe or calls to a 3rd party site (with another domain) then you can test the script above by turning on the Storage Access API feature in the experimental features.

In the MS Edge (chromium) browser use this URL-

edge://flags/

 

In Chrome, use this URL-

chrome://flags/

 

Find and enable the 'Storage Access API' feature to enable the method used by the script.

 

There will likely be some updates here to clarify behavior.