Overview
End users may observe sporadic slowness in actions related to SharePoint Online repositories in the vault. Overall the repo connection works, and the vault itself too.
For example, opening Views, selecting one or more objects and seeing their metadata and preview when it is about SPO objects is slow; however, opening a view or objects that are vault-only is normal (i.e., fast).
In a similar fashion, a search that includes the SharePoint Online repo may be slow, but a search that does not include it (i.e., searches in the vault only) is fast.
A common description is that sometimes the SPO repo is fast, other times not; or that it is slow on certain days or times, or for certain geographical areas, especially if there are more employees in a given location or time zone.
This can also affect background operations like indexing, permission retrieval and user sync (which is one of the reasons why it slows the client, client operations check with the background operations in the server).
Details
SharePoint Online has a rate limit of how many requests you can make per X time. When it deems that you have made too many, it will throttle your requests and respond for example with status code 429 (too many requests), instead of data, and will keep responding with an error until it lifts the throttling. This breaks any and all operations against it for that duration - both background operations such as indexing, and user operations such as browsing metadata and searches.
In versions of the M-Files connector for SharePoint Online later than 22.2.91.0, the connector tries to prevent this - it checks the rate limit and puts itself into cooldown so we don't have SPO throttle us, as the cooldown then is longer. Older versions can more easily get throttled and be in a worse state ultimately (entries in the Windows Event Log will be seen with wording around throttling).
So, instead of everything being broken for an unknown period of time, some requests are delayed and appear as slowness to the users, so things still continue to function.
What you can do about it
While there is little to be done on the M-Files side, since this limitation does not stem from M-Files, you can consider the following:
- Use separate EntraID applications for each separate location used in M-Files, as opposed to reusing one single app for all connections.
- We cannot guarantee this will help, but wording in the Microsoft documentation (at the time of writing) implies that the rate limiting may happen per-application, not necessarily per-tenant. Therefore, it is possible that giving each connection its own application, it may have its own pool of connection limits.
- Inform users to be patient.
- We have an enhancement with ID 171741 to make this behavior more user friendly (e.g. through some message or loading indicator).
- Migrate SPO objects to proper vault objects so you can use them only in M-Files, instead of through an external connection which adds a layer of complexity.
- There are many features vault objects offer that external objects do not, you can read more about them here: Missing features for Unmanaged Objects (site.com).
- If you have many SPO connections in the vault, especially to the same tenant, reduce them, if possible.
- If possible, use personal authentication over common user.
- If possible, reduce the usage (i.e., requests).
- If your tenant is large, and has more than the default 1200 requests limit, increase the limit rate in the connection settings and/or change the rate limiting mode (see its configuration guide for details on the throttling prevention settings: Installing and Configuring M-Files SharePoint Online Connector.pdf).
- NOTE: be careful if editing these settings and monitor the situation, wrong configuration may cause actual throttling which may be more problematic than the initial slowness.
