How to connect tools and API when using OAuth
Posted by Zachary Wick (M-Files) on 24 July 2019 09:36 PM
Version 1.0 | Last Updated 5 March 2019
When using OAuth and other authentication protocols that force M-Files to authenticate against an outside source, this can cause tools and the API to stop functioning. There are two workarounds for this issue.
The part to pay attention to is the key below. This key governs what accounts OAuth tries to authenticate.
Key => Host:<network address>:<account type>
Usage This key limits the plugin usage to a certain account type.
The Importer tool must use an M-Files account. The above example will apply OAuth only for Windows accounts. Importer tool as well as the API can continue login using M-Files accounts.
For the API you can use the ConnectInteractive method as below
For the Importer tool you can check the box that says "Connect Interactively" on the M-Files Connection Tab.