Frequently Asked Questions
Frequently Asked Questions
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

1     Overview / Work Notes

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.

2    Solution / Workaround

Workaround 1:

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.

Example Host:myVault.cloudvault.m-files.com:Windows

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.

 

Workaround 2:

For the API you can use the ConnectInteractive method as below

mFilesServerApplication.ConnectInteractive(
ServerDisplayName: server,
ParentWindow: IntPtr.Zero,
ReturnNoneIfCancelledByUser: true,
DefaultAuthType: MFAuthType.MFAuthTypeLoggedOnWindowsUser,
ProtocolSequence: "ncacn_ip_tcp",
NetworkAddress: server,
Endpoint: "2266"
);

 

For the Importer tool you can check the box that says "Connect Interactively" on the M-Files Connection Tab.

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako case