Trending issue with Distributed Cache and July 2026

UPDATE: This issue is fixed by the August 2026 updates.

The July 2026 update was released July 14, 2026. This introduced many security fixes but this can cause issues with your SAML, OIDC, or FBA implementations. This can prevent tokens from being added or read from dcache.

Here are some logs from my 2019 farm:
07/18/2026 12:18:03.74 w3wp.exe (0x0FF8) 0x1914 SharePoint Foundation DistributedCache air38 Medium Token Cache: Failed to add token from distributed cache. Key: ‘0e.t|microsoftentratrust|user1@TestTestTest.onmicrosoft.com’, Exception: ‘System.NotSupportedException: Specified method is not supported. at Microsoft.SharePoint.IdentityModel.SPTokenCache.NotSupportedCookieTransform.Encode(Byte[] value) at Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ApplyTransforms(Byte[] cookie, Boolean outbound) at Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.WriteToken(XmlWriter writer, SecurityToken token) at Microsoft.IdentityModel.Tokens.SecurityTokenSerializerAdapter.WriteTokenCore(XmlWriter writer, SecurityToken token) at Microsoft.SharePoint.Administration.Claims.SPTokenCacheEntry.SerializeToken(SecurityTokenSerializer tokenSerializer) at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCache.Put(String key, Object value) at Microsoft.SharePoint.IdentityModel.SPTokenCache.AddCachedTokenV1(String cachekey, SPTokenCacheEntry value)’. 908628a2-2a7c-10e3-545f-1f5de6df25d3

07/18/2026 12:18:03.74 w3wp.exe (0x0FF8) 0x1914 SharePoint Foundation DistributedCache air39 Medium Token Cache: Reverting to local cache to Add the token. Key: ‘0e.t|microsoftentratrust|user1@TestTestTest.onmicrosoft.com’. 908628a2-2a7c-10e3-545f-1f5de6df25d3

Log entry from SPSE:
07/23/2026 14:34:31.14 w3wp.exe (0x6128) 0x2814 SharePoint Foundation DistributedCache aa6e6 Unexpected Unexpected error in ByteArrayToObject – Exception ‘System.NotSupportedException: Specified method is not supported. at Microsoft.SharePoint.IdentityModel.SPSessionSecurityTokenHandlerV2.ReadToken(XmlReader reader) at System.IdentityModel.Tokens.SecurityTokenHandlerCollection.ReadToken(XmlReader reader) at Microsoft.SharePoint.Administration.Claims.SPTokenCacheEntry..ctor(SerializationInfo info, StreamingContext context) at ReadSPTokenCacheEntryFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] ) at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader) at Microsoft.SharePoint.DistributedCaching.SPDistributedCacheUtils.ByteArrayToObject[T](Byte[] Buffer)’.

The PG is currently investigating the issue above and hoping to get a fix sooner than later. I would suggest using sticky sessions or persistence at your NLB. Failing to read a token from the dcache will fall back to the local cache(the STS). If the request hits a different WFE than the one you and the token is unable to be located (dcache and local), SharePoint invalidates the clients FedAuth cookie and makes them reauthenticate.

AuthProviderTypeChangeEnabled – Preventing migrations in User Profile Synchronization

There is new logic in the User Profile Service Application that will prevent user migration between authentication providers. This means no more migrating from Windows to Trusted Identity Provider or Trusted Identity Provider during User Profile Sync.

This is only available for SharePoint Subscription Edition(SE) and SharePoint 2019 with February 2023 CU.

AuthProviderTypeChangeEnabled is set to false out of the box. If you have Windows user profiles and want to sync them as SAML, the sync will not happen for those profiles. The ULS log entry will show during the sync:

05/27/2023 07:08:09.17        OWSTIMER.EXE (0x3094)        0x4C64        SharePoint Portal Server        User Profiles        4ytvv        High        Trying to migrate account from ‘contoso\User1’ to ‘i:0e.t|ContosoAdfs|user1@contoso.com’, which is not allowed because the authentication provider type is changed.        e56b4303-927d-43eb-a9ac-8f47d92fe65c

To change the property to true we need to do that at the UPA’s proxy:

$upaproxy = Get-SPServiceApplicationProxy | ? {$_.typename -eq "User Profile Service Application Proxy"}
$upaproxy.AuthProviderTypeChangeEnabled = $true
$upaproxy.Update()

I would suggest running the sync and flipping the property back to $false to prevent migrations.

SharePoint 2019 – Unable to Open Visio Files in Browser

Ran into a new issue with Visio Service Application and SharePoint 2016/2019. The failure is with trying to open Visio files in the browser.

The Document can’t be opened because it is not a supported Visio diagram.

Make Sure that the “Web Drawing URL” web part setting is set to a valid VSDX, VSDM, or VDW file.

We know that it’s a valid file since we can open it with Viso outside of the browser.

In the ULS logs we can see we fail with a permission issue trying to open the Content Database. This will happen if you’re running your Visio service application pool with a different account than the web application’s application pool.

03/24/2021 13:28:14.47 w3wp.exe (0x3254) 0x35DC SharePoint Foundation Database 880i High System.Data.SqlClient.SqlException (0x80131904): Cannot open database “WSS_Content” requested by the login. The login failed. Login failed for user ‘Contoso\WebServiceAccount’. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection() ClientConnectionId:4fc5e745-930d-48c7-bd5f-29416551fc91 Error Number:4060,State:1,Class:11 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.47 w3wp.exe (0x3254) 0x35DC SharePoint Foundation Database 880k High at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, Boolean retryForDeadLock) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command) at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.GetVersion(SPDatabase database, Guid id, Version defaultVersion, SqlSession session, SPDatabaseSequence sequence) at Microsoft.SharePoint.Administration.SPDatabase.get_BuildVersion() at Microsoft.SharePoint.Administration.SPContentDatabase.get_StoredProceduresSchemaVersion() at Microsoft.SharePoint.Administration.SPContentDatabase.get_SupportsGetSecureUrlForDocId() at Microsoft.SharePoint.SPFile.EnsureWebRelativeUrl() at Microsoft.SharePoint.SPFile.PropertiesCore(Boolean throwException) at Microsoft.SharePoint.SPFile.get_Exists() at Microsoft.Office.Visio.Server.GraphicsServer.SharePointFile.GetFile(Uri requestedFileUrl, Object userToken, String fileGuid) at Microsoft.Office.Visio.Server.GraphicsServer.DocumentManager.GetRasterPage(RasterPageRequest request, GetRasterDiagramCallback callback, ReaderWriterFlags& rwflags) at Microsoft.Office.Visio.Server.GraphicsServer.ServiceCore.GetRasterPage(RasterPageRequest request) at Microsoft.Office.Visio.Server.GraphicsServer.VisioGraphicsService.GetRasterPage(RasterPageRequest request) at SyncInvokeGetRasterPage(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result) at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.Runtime.InputQueue`1.AsyncQueueReader.Set(Item item) at System.Runtime.InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread) at System.Runtime.InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread) at System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread) at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result) at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result) at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.OnRead(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Web.Hosting.AsyncResultBase.Complete(Int32 hresult, Boolean synchronous) at System.Web.Hosting.PipelineRuntime.AsyncCompletionHandler(IntPtr rootedObjectsPointer, Int32 bytesCompleted, Int32 hresult, IntPtr pAsyncCompletionContext) 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.47 w3wp.exe (0x3254) 0x35DC SharePoint Foundation Database 880j High SqlError: ‘Cannot open database “WSS_Content” requested by the login. The login failed.’ Source: ‘.Net SqlClient Data Provider’ Number: 4060 State: 1 Class: 11 Procedure: ” LineNumber: 65536 Server: ‘sql.contoso.com’ 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.47 w3wp.exe (0x3254) 0x35DC SharePoint Foundation Database 880j High SqlError: ‘Login failed for user ‘Contoso\WebServiceAccount’.’ Source: ‘.Net SqlClient Data Provider’ Number: 18456 State: 1 Class: 14 Procedure: ” LineNumber: 65536 Server: ‘sql.contoso.com’ 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.47 w3wp.exe (0x3254) 0x35DC SharePoint Foundation Database 3760 Critical SQL Database ‘WSS_Content’ on SQL Server instance ‘sql.contoso.com’ not found. Additional error information from SQL Server is included below. Cannot open database “WSS_Content” requested by the login. The login failed. Login failed for user ‘Contoso\WebServiceAccount’. 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.47 w3wp.exe (0x3254) 0x35DC Visio Graphics Service Graphics Service 8061 Critical File not found at this location: https://sp/Docs/Test.vsdx Exception : Cannot retrieve the file 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.47 w3wp.exe (0x3254) 0x35DC Visio Graphics Service Graphics Service 8079 Critical Failed to generate raster diagram for file https://sp/Docs/Test.vsdx page -1 Error : System.ServiceModel.FaultException`1[Microsoft.Office.Visio.Server.GraphicsServer.VisioGraphicsServiceFault]: The creator of this fault did not specify a Reason. (Fault Detail is equal to Microsoft.Office.Visio.Server.GraphicsServer.VisioGraphicsServiceFault). 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.48 w3wp.exe (0x2650) 0x3748 Visio Graphics Service Web Access aputu High GetRasterPage Failed: Exception=System.ServiceModel.FaultException`1[Microsoft.Office.Visio.Server.GraphicsServer.VisioGraphicsServiceFault]: The creator of this fault did not specify a Reason. (Fault Detail is equal to Microsoft.Office.Visio.Server.GraphicsServer.VisioGraphicsServiceFault). 4477b79f-24a2-70c6-0173-a2d4bb51b53f

03/24/2021 13:28:14.48 w3wp.exe (0x2650) 0x3748 Visio Graphics Service Web Access 8078 Critical Failed to get raster diagram for visio file https://sp/Docs/Test.vsdx page default page ID Exception : System.ServiceModel.FaultException`1[Microsoft.Office.Visio.Server.GraphicsServer.VisioGraphicsServiceFault]: The creator of this fault did not specify a Reason. (Fault Detail is equal to Microsoft.Office.Visio.Server.GraphicsServer.VisioGraphicsServiceFault). 4477b79f-24a2-70c6-0173-a2d4bb51b53f

To fix this script will add in that account to all the content databases

Add-PSSnapin *sh*


$vsa = Get-SPServiceApplication | ? {$_.TypeName -eq "Visio Graphics Service Application"}
$svcAccountName = $vsa.ApplicationPool.ProcessAccount.Name

Write-Host "Found the account $svcAccountName running application pool for Visio"
$yn = Read-host -Prompt "Would you like to apply AdminShell for account $svcAccountName to all content databases? Y/N"
If($yn -eq "y")
{

}
Else
{
    break
}

$cdbs = Get-SPContentDatabase -NoStatusFilter

Foreach($cdb in $cdbs)
{

    Try
    {
        Write-Host "Applying permissions for database $($cdb.Name)"
        Add-SPShellAdmin -UserName $SvcAccountName -database $cdb
        Write-Host "Sucessfully applied permissions for database $($cdb.Name)" -ForegroundColor Green
    }
    Catch
    {
        Write-Host "Failed to apply for database $($cdb.Name)" -ForegroundColor DarkRed
        Write-Host $_

    }

}

SharePoint – ADI Mappings

We have been seeing more issues with Active Directory Import (ADI) in the recent months due to the confusion of mappings. My colleague, Josh, wrote a great article on the issue with Work Email not populating.

Upgrading from 2013 or FIM to ADI

Mappings in 2013 with using the User Profile Synchronization Service (FIM) showed up in the page Manage User Properties in the User Profile Service Application.

Active Directory Import (ADI) shows no mappings in the same page but as Josh’s post states above this is as expected.

The only mappings that we will need to be concerned with are the ones that are not out of the box. We wouldn’t need to map things like Last Name to sn since it is hardcoded.

NOTE: Any misspelling or mapping to a nonexistent property in AD will result in the user profile property not updating.

Emails have “SMTP:” prefix in the User Profile

This is caused by adding an explicit mapping for Work Email to proxyAddresses. This will bypass the code that parses all the values of proxyAddresses and select the first string in as a value. This may even select a “SIP:” prefix as well. Since proxyAddresses is a multivalued property in AD but a string (single value) in the User Profiles, the explicit mappings will override the out of the box mapping.

Solution: Remove the mapping for Work Email and run a full sync.

Summary

Most of the properties that are out of the box will not need to be mapped. The only User Profile properties that will need to be explicitly mapped will be the custom mappings.

PowerShell Script: Check user profiles

I have been asked many times how to check if Active Directory Import is working. With User Profile Synchronization, we had the FIM client to show what was updated during the MOSS_Export step.

The script I wrote uses DirSync which allows for incremental checks against Active Directory. This will create a cookie.bin that will keep track of state of AD when you ran it last. The account we would like to use is the same account you’d use sync user profiles.

The service account we would need to run this with your sync account that will connect to Active Directory with Replicate Directory Changes.

Adjust the script to match your environment. Be sure to add the mappings.xml file to the folder specified on Line 11.


Mappings

Mappings can be added or subtracted from the mappings.xml file that is included. This file is needed to know what we would like to check from AD to SharePoint. When adding in additional mappings, be sure to match the internal name(s) of the profile properties.


Results

The script will out put a CSV with tab as the delimiter character. This will allow easier sorting to troubleshoot the specific user profile. UPA Value column is what the user profile has


For a good troubleshooting guide user profiles not syncing check out my colleague Josh’s guide: https://joshroark.com/sharepoint-all-about-non-imported-user-profiles/

Download the script here