This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Acquiring the authentication token with Windows SSO

Hi everyone,

With the help of the following example, I can acquire the authentication token with Windows user or M-files user:

http://www.m-files.com/mfws/gettingstarted.html

var getToken = function (username, password, vault) {

    // Request an encrypted token with the login information.
    $.ajax({
        url: "example.org/.../authenticationtokens.aspx",
        type: "POST",
        dataType: "json",
        contentType: "application/json",
        data: JSON.stringify({ Username: username, Password: password, VaultGuid: vault }),
        success: processToken
    });
};

var processToken = function (token) {
    // Set the header.
    $.ajaxSetup({ headers: { "X-Authentication" : token.Value } });
};


Now, M-files 10 allows authentication with Windows SSO. I'd like to know how to use Windows SSO authentication to acquire the authentication token and how to use it automatically?

Thanks a lot.


  • Hi,

    This is not currently supported by M-Files Web Service API but the the idea is great! I added this as an improvement suggestion to M-Files R&D tracker (ID 62062). You can follow implemented improvements from M-Files release notes: www.m-files.com/.../release-notes
  • Hi,

    With M-Files 10.0 Service Release 3 support for Single Sign-On (SSO) for current Windows user in M-Files Web Services is now available.

    I'd like to know how to implement this feature in an ajax request?

    Thanks
  • Former Member
    Former Member

    Hi,

    With M-Files 10.0 Service Release 3 support for Single Sign-On (SSO) for current Windows user in M-Files Web Services is now available.

    I'd like to know how to implement this feature in an ajax request?

    Thanks


    Hi,

    someone knows how to use SSO with M-Files Web services? How can I get a token using SSO?

    Thanks in advance.

    Regards
  • Former Member
    Former Member
    * Bump *

    This would be extremely useful in a web application.
    I've seen that you have to contact M-Files support in order to get instructions on how to do this.
    Anyone who possesses the knowledge on how to do it? :)

    Best regards
    Fred
  • Hi,

    From client side it is possible to use SSO authentication by making an ajax request to WebServiceSSO.aspx. This is a bit confusing as this page is part of M-Files Web and not M-Files Web Service (notice that there is no /REST in the url).

    $.get( 'example.org/WebServiceSSO.aspx )
    .done(connectedToServer)
    .fail(processError);


    This will authenticate against the Current Windows User using NTLM and save the session id to the cookie. The following ajax requests will use the session in the cookie when no authentication token in provided in the header.

    Important: With the SSO authentication, it is not possible to get a working authentication token (i.e. by making a get request to /session/authenticationtoken).

    Best regards,
    Mikko Roihuvuo, Developer Evangelist, M-Files