The Telerik Platform product is retired.Learn more

Integrating Active Federation

Integrating Active Federation

Active federation involves contacting the Active Directory Federation Services (AD FS) web services endpoints. You need to obtain an AD username and password pair from your app user before you can use active federation.


You need to make certain settings before you can successfully log in your app users through AD FS.

Obtaining a SAML Token

You need to obtain a SAML security token from the Active Directory Federation Services Security Token Service (AD FS STS) before calling the Backend Services JavaScript SDK method for registration/authentication.

Use your favorite web services library to make the calls.

The following steps explain the basic method for obtaining a SAML security token: filling in a template RST message and sending it to the STS over HTTPS as a Web Services request.

The presented method uses Transport Layer Security. If you need a higher degree of security, discuss the alternatives with your AD FS administrator.

  1. Customize the following request body template for your environment. You need to replace the following tag values:

    • <s:Header><a:To>—the URL of the UsernameMixed endpoint
    • <o:Security><o:UsernameToken><o:Username>—the username of the AD user account that you want to register or authenticate, including the domain name
    • <o:Security><o:UsernameToken><o:Password>—the password for the above user
    • <s:Body><trust:RequestSecurityToken><wsp:AppliesTo><a:EndpointReference><a:Address>—the URL of Backend Services API server appended with a slash and then your app's App ID.

      <s:Envelope xmlns:s=""
          <a:Action s:mustUnderstand="1"></a:Action>
          <a:To s:mustUnderstand="1">https://your.adfs.server/adfs/services/trust/13/UsernameMixed</a:To>
          <o:Security s:mustUnderstand="1" xmlns:o="">
              <o:Password Type="">your-password</o:Password>
          <trust:RequestSecurityToken xmlns:trust="">
            <wsp:AppliesTo xmlns:wsp="">
  2. Send a POST request to your your AD FS service's UsernameMixed endpoint using the body the you constructed in the previous step.

        POST https://your.adfs.server/adfs/services/trust/13/UsernameMixed
        Content-Type application/soap+xml; charset=utf-8
        (Body from previous step)
        Status: 200 OK
        application/soap+xml; charset=utf-8
        (skipped for brevity)
  3. Take the XML data that you received as response and encode it in Base64 format.

The resulting Base64-encoded string is the SAML token in a format suitable for passing to Backend Services RESTful endpoints or SDK methods.

Registering or Authenticating a User

The Backend Services JavaScript SDK provides a single method that is used for both registration and authentication. On first invocation the user is registered with Telerik Platform. On consequent invocations for the same user Telerik Platform authenticates the user.

The Authentication.loginWithADFS() method takes an Base64-encoded AD FS SAML security token that you must have acquired beforehand. On success, the method returns an object containing a Telerik Platform access token (not to be mistaken with the AD FS SAML security token) that can be used with further Backend Services JavaScript SDK operations. In that, the loginWithADFS() method behaves similarly to the login() method. If the user has already been registered, the object contains Id and CreatedAt fields in addition.

var el = new Everlive('your-app-id');
var accessToken = "AD FS access token here";
    function (data) {

See Also

External resources:

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.