Overview
When setting up the M-Files for Microsoft Teams Add-In, you may get an error like "Login Failed" as soon as you enter the addresses and try to save, before you see a login prompt (or a short popup that does the silent login because you may already be logged in to the vault).
The most common reason for that is that the federated authentication scope is not set up correctly per the documentation. Please double check it.
If the federated authentication setup is correct, you may still get this error in case the gRPC connection is not working on the given port.
Solution
M-Files for Teams requires a gRPC connection to the vault.
By default, it will try to use port 443, because this is the port used in the M-Files cloud.
In the M-Files cloud the gRPC protocol is enabled by default.
In on-premises installations you need to perform some extra actions:
- Ensure that gRPC is set up and enabled (see more here: Setting Up M-Files to Use gRPC.pdf).
- Note that IIS cannot be used as a gRPC proxy because it does not support the necessary features at the time of writing, so you may need a separate proxy (an example is available here: Using Reverse Proxy with M-Files).
- Enter the correct port where gRPC is enabled on M-Files Server into the Teams add-in prompt.
- By default, in on-premises installations, the port is 7766 if it is opened directly towards the M-Files server machine.
- Routing the gRPC vault connections via port 443 needs explicit actions from the network administrators.
- Ensure gRPC connectivity works well on this port and DNS name for an M-Files client.
- The easiest way is to use the M-Files Desktop client to connect to the server with the same DNS name and port from the same client machine. This will also let you double check the port in the settings in case it is different.
Notes
We understand that this error message can be misleading in this situation, and we have logged an improvement with ID 99774 to clarify the text in different situations (e.g., differentiate between networking and actual login issues). You can monitor the Teams Add-in release notes that will be posted here to know when this improvement becomes available.
