Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
MoeE
Partner - Specialist
Partner - Specialist

Multiple CDC tasks failing with "An unexpected error occurred while trying to retrieve access token”

Hi,

 

A client's CDC tasks are frequently failing intermittently with the following error after a windows patch last month. 

 

RetCode: SQL_ERROR  SqlState: 42000 NativeError: 105117 Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]An error occurred while authenticating against Managed Service Identity: 'An unexpected error occurred while trying to retrieve access token.’

 

The target is Azure Analytics. I've researched the error online and haven't found much indication to the issue. Has anyone seen this before? The task stops, then can be resumed again. I am also seeing these two errors every time this occurs

[TARGET_APPLY    ]E:  Failed to load data of file CDC000013BF.csv to database 

[TARGET_APPLY    ]E:  Failed to copy data to net changes table [1022505]  (bulk_apply.c:6413)

 

Help with this is appreciated. Thank you

 

Kind regards,

Mohammed

Labels (1)
1 Reply
john_wang
Support
Support

Hello Mohammed, @MoeE 

Thanks for the post here.

RetCode: SQL_ERROR  SqlState: 42000 NativeError: 105117 Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]An error occurred while authenticating against Managed Service Identity: 'An unexpected error occurred while trying to retrieve access token.’

It appears that the issue is more likely related to the latest Windows patch or the SQL Server ODBC Driver.

The error indicates that the Managed Identity token failed to be retrieved from the Azure Instance Metadata Service (IMDS).
Possible causes include:

  • A temporary Azure MSI (Managed Service Identity) outage
  • Network connectivity issues between the host and IMDS

In summary, these errors reflect a Synapse client/server communication problem.
This issue should be reviewed by the user’s DBA or escalated to Microsoft if necessary.

If you would like to investigate further, we suggest the following steps:

  1. Check the SQL Server ODBC Driver version 

  2. Review driver timeout period — by default, the ODBC driver waits only a few seconds to retrieve the MSI token. If IMDS responds slowly, authentication may fail.

  3. Set TARGET_APPLY to Verbose, reproduce the issue, and review the detailed task log files.

  4. Enable ODBC tracing to capture additional diagnostic details.

Hope this helps.

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!