web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

SharePoint connection behaviour differing for interactive and batch sessions

(3) ShareShare
ReportReport
Posted on by 305
We're using the bank statement import feature of F&O with Document types specifying SharePoint folders that are then associated with the Electronic reporting source for the bank statement. When we use the Import statement function on the Bank statement form and run the import interactively, the expected SharePoint move from input to archive is completed successfully. If the Import statement function is sent to batch, the statement is read & imported, but the movement action fails with the error File cannot be moved to Archive folder.An unknown error occurred while communicating with the SharePoint server 'client.sharepoint.com'.  This behaviour is the same for all users: accessing the F&O interface as the admin or batch user successfully moves files interactively, but sending to batch fails.

This is perhaps consistent with the Document management parameters form, where the
  • Test interactive SharePoint connection link succeeds with the infolog message Successfully connected to SharePoint server 'client.sharepoint.com'
  • Test batch SharePoint connection gives the infolog message You are not authorized to connect to 'client.sharepoint.com'
for both admin and batch user. Accessing the SharePoint folders directly through the web UI for either of those user accounts allows a file to be uploaded to the archive folder, so I wonder whether there's a different account I should be checking for the batch execution. I assume the statement "Batch jobs are run by using the security credentials of the user who created the job" from the MS page on batch jobs applies primarily to RBAC in F&O, but is also relevant to any external connections, so if a process works as user X interactively, it should work the same in batch. Can anyone please advise what I'm missing?

I've seen a few SharePoint threads: December 2022, September 2023, September 2023 (clearly a good month for SharePoint issues), but they don't directly address batch vs interactive
I have the same question (0)
  • Lyn033465 Profile Picture
    2 on at
    SharePoint connection behaviour differing for interactive and batch sessions
    We also have this issue. Where do we need to run the script? Is it in Azure? Your assistance is greatly appreciated in advance!
  • Rich Profile Picture
    305 on at
    SharePoint connection behaviour differing for interactive and batch sessions
    Excellent, thanks Martin. Happy to confirm that's also worked for us (took a while to get the right people to run the script, hence delay in confirmation). Much appreciated.
  • Verified answer
    Martin Dráb Profile Picture
    235,838 Most Valuable Professional on at
    SharePoint connection behaviour differing for interactive and batch sessions
    There is an extra step in 10.0.40 and later needed for the non-interactive (batch) connection. See Configure document management > Configure SharePoint storage > One-time registration process.
     
    Following the steps solved this problem for us.
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,610 Super User 2025 Season 2 on at
    SharePoint connection behaviour differing for interactive and batch sessions
    Hi,
    Have you activated "Upgrade SharePoint user authentication" feature?
    If not, it can be related to following case Details for issue 938936
    You can evaluate to create a support case with Microsoft to get better support.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 708 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 589 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 553

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans