Overview
Here are short instructions for gathering logs for M-Files support when troubleshooting issues with the Teams Add-in.
Solution
If the Teams add-in is giving you a generic "Login failed" error during the initial configuration, please refer to this article: /article/Teams-Add-in-Login-failed-error-may-be-due-to-gRPC-connectivity-issues
In other error situations, follow the instructions below to gather the required logs.
Enabling logging in M-Files' federated authentication settings
- In the target vault in M-Files Admin, go to Configurations > Federated Authentication.
- Expand the configuration whose scope is *:Teams.
- Under both Server settings and Client settings, set "Show advanced options" to "Yes".
- In the advanced options, set "EnableLogging" to "true" under both the "Client" and "Server" settings.
Gathering the relevant logs
- Once logging has been enabled in M-Files Admin, repeat the issue that you are investigating with the add-in and make a note of the time in UTC when you repeated the issue.
- Collect Windows Event Viewer's Application log from the M-Files Server (and from the IIS server if it is a separate machine) and from the client computer: /article/Gathering-Windows-Event-logs
- Send the following to M-Files support (make sure to follow these instructions to send the data securely: /article/How-to-Send-Files-via-CryptShare-Portal):
- An export of Windows Event Viewer's Application log from the server(s).
- An export of Windows Event Viewer's Application log from the client.
- The UTC time of the attempt.
- The user name of the user who performed the action (such as 'user.name@company.com').
Using Developer Tools in Teams
In some cases, you may be asked to provide Developer Tools (DevTools) logs from Teams. In that case, follow these steps:
If you are using a web browser, DevTools is usually opened by pressing F12 or Ctrl+Shift+i. Follow this guide to collect the logs from the browser: /article/How-to-gather-network-log-from-Google-Chrome-for-M-Files.
If you are using Teams desktop client, collect the same network and console logs as above, but first you need to enable DevTools, which may be a little complicated and can vary between the versions of Teams.
- With the 'new" Teams client that was released in 2023-2024, you need to carry out the following steps. Note that this seems to be unofficial information found online (see the post here) and M-Files cannot guarantee the availability of the resources, their accuracy and whether this will continue to work in the same way in the future:
- Create a configuration.json file under:
%localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams - In the file, add the following line:
{"core/devMenuEnabled": true} - Restart the Teams client.
- Right-click the Teams client icon in system tray to see the Engineering Tools entry point.
- Create a configuration.json file under:
- With the "old" Teams client (prior to 2023-2024), it may take a couple of tries to open the Teams client's DevTools: double click the Teams icon in Windows notification area with the left mouse button and then right-click the icon. If done successfully, then "DevTools" should be available in the context menu like this:
You may have to try this several times to get it right. Once DevTools is available in the context menu, select DevTools > Open DevTools (Select WebContents) > webview.
Once DevTools have been successfully opened, repeat the issue and send the resulting logs to us following these instructions:
/article/How-to-Send-Files-via-CryptShare-Portal
