Intermittently get Microsoft login prompt when trying to open Excel file with BluePrism

125 views Asked by At

We have a Blue Prism bot which opens an Excel file on SharePoint.

The process runs 6 times a day, but about once per day, we get the Microsoft Sign in box below:

enter image description here

This is unexpected and stops the process. If we rerun the process and Excel launches successfully.

Additional details:

  • Bot OS: Windows 2019 Server
  • Office version: Microsoft Office 2019 (we are not allowed to use Office365)

What is causing this and how can we prevent it from happening?

1

There are 1 answers

0
gorzko On

Are you using SharePoint GUI to open this Excel file? That seems like a bad idea. Please familiarize yourself with this page: https://support.microsoft.com/en-us/topic/considerations-for-server-side-automation-of-office-48bcfe93-8a89-47f1-0bce-017433ad79e2.

All current versions of Microsoft Office were designed, tested, and configured to run as end-user products on a client workstation. They assume an interactive desktop and user profile. They do not provide the level of reentrancy or security that is necessary to meet the needs of server-side components that are designed to run unattended.

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.

The best way to work with Excel files on SharePoint is Graph API. You can find ready to use components on Digital Exchange. If it's hard to have app registered in your company's AD, check out SharePoint REST API which you can setup with site admin.