Hi @Michelle ,
This doesn't look like a permission or gMSA issue your xp_cmdshell test already proves the account can access the share. The real issue is that BULK INSERT uses the impersonated remote client's security token for file I/O, not the gMSA's OS-level Kerberos session. That token is a non-forwardable network logon token, so no CIFS ticket is even negotiated hence the error code 5. That's why local execution and SQL Agent (no delegation needed) both work fine.
Try bellow few Practical options.
- SQL Agent job via sp_start_job wraps the procedure, avoids the hop
- BCP via xp_cmdshell since you've confirmed xp_cmdshell works, BCP runs as a real OS process under the gMSA and sidesteps the thread impersonation issue entirely
- RBCD on the file server configure Resource-Based Constrained Delegation on the file server computer object to trust the SQL gMSA, and ensure TrustedToAuthForDelegation is set on the gMSA for protocol transition (S4U2Self). This is the clean fix if you want BULK INSERT to work as-is without workarounds.
Thanks,
Akhil.