Integrating a third-party identity provider in front of Microsoft ADFS with Parallels Secure Workspace

1 users found this article helpful


Note: This article provides a demo configuration. The support team will not assist in setting up the link between Microsoft ADFS and the third-party identity provider (IdP). Support is limited to troubleshooting issues between Parallels Secure Workspace and Microsoft ADFS.


Some customers would like to authenticate using their national ID issued by their government.

This scenario could be applied to any situation where there is an Identity Provider providing some form of unique identifier. In practice, this IdP is often a web platform where users can sign in using various methods; for example using some form of national ID. This unique identifier is stored as an attribute value of the Active Directory user object.

Since this unique identifier is not the user principal name (UPN) which is required by Parallels Secure Workspace, Microsoft ADFS will add this information during the authentication flow.



To map some terminology between SAML and Active Directory Federated Services:



Basic description

Claims Provider (CP)

Identity Provider (IdP)

Responsible for authenticating the user and providing additional information about the identity of the user.

Relying Party (RP)

Service Provider (SP)

Responsible for providing a service.

In this tutorial, there are 2 relationships:

  1. Between KeyCloak and Microsoft ADFS. In this case, KeyCloak will be the claims provider. Users will authenticate against KeyCloak. KeyCloak provides the identity; while Microsoft ADFS consumes this identity and is thus the relying party or service provider.

  2. Between Microsoft ADFS and Parallels Secure Workspace. In this case, Microsoft ADFS acts as the IdP to Parallels Secure Workspace (SP).



How it works

For the end user, this is the flow:


In the background, this is how everything is linked:

External IdP ← Link: unique identifier → Microsoft ADFS ← Link: user principal name → Parallels Secure Workspace.

Microsoft ADFS will find the proper Active Directory user by issuing a query to find the (only) user who has this unique identifier as the value of one of the Active Directory user attributes. Microsoft ADFS will issue some claims, providing additional info about the user if needed. In this example, this means the user principal name (UPN) and a display name will be passed to Parallels Secure Workspace.


Working setup

This example assumes a “national ID” will be used as the link to identify an authenticated user (through KeyCloak) in Microsoft ADFS.

In reality, for security reasons, this should not be a plain text version but a non-decryptable hash or another unique alternative identifier.


Note: the initial setup of KeyCloak is not in the scope of this article.

Configuring the client

In the dedicated realm (already created - in this example: realm-test-nationalid), go to Clients > Import Client.

The configuration can mostly be imported from the federation metadata XML.

Specify the URL:

It’s possible to tweak the example configuration for debugging (e.g. disable encryption). For the final configuration, be sure to make it as secure as possible.

The imported configuration will look like this:

For client scopes, there will be a dedicated one that needs to be adjusted. Just click on the name of this dedicated scope.

For each claim (in this example: "nationalID")

Click Add Mapper > By Configuration > User Attribute (Map a custom user attribute to a SAML attribute).

Do the same for the given name claim, assuming the given name from the KeyCloak Identity Provider should be used as a display name in Parallels Secure Workspace.
( Use the URI: )

Configuring the user

Go to Users > select the user > Attributes and add the custom attributes.


Microsoft ADFS

Configuring KeyCloak as a Claims Provider

In the ADFS console, go to Claims Provider Trusts.
At the right, choose the Add Claims Provider Trust … action.

Import the metadata XML which can be obtained in KeyCloak from the Realm Settings:

After import, it should look similar to this:

Hint: go to the Certificates tab to check out the details and import the certificate in a trusted certificate store.

When surfing to the ADFS ( ), the KeyCloak option should be listed as well now (assuming a default configuration where only Active Directory was present before).

Configuring acceptance claim rules

The acceptance claim rules will be used to find Active Directory users and find their UPN.

Some info could also be passed on (e.g. if the given name provided by the claims provider can stay untouched). Otherwise, adapt and use the same approach as for the UPN to find the given name.

In ADFS: Claims Provider Trusts > select KeyCloak: in the actions menu (at the right), click Edit Claim Rules…

Configure these two rules:


Configure a rule to find the UPN.

In this custom rule, the claim sent by KeyCloak (“nationalID”) will be used to query the Active Directory to find a user principal name.

c:[Type == "nationalID"]
 => issue(store = "Active Directory", types = (""), query = "(description={0});userprincipalname;somedomain\someuser", param = c.Value);


Basically, there is an LDAP query to find the user whose "description" (can be any other LDAP attribute) matches the unique value of the “nationalID” claim.

Then, Microsoft ADFS issues a new claim:

The structure of the query is: <LDAP_FILTER>;<DESIRED_LDAP_ATT>;<LDAP_USER> .

LDAP filter is an LDAP query. Variables ( {0} ) are specified near the end.

In this case, only select one desired LDAP attribute: userprincipalname .

The LDAP user can be any valid user name. However, it must be specified as domain\user.



Configure a rule to issue the given name claim.

Note: in this example, the given name already comes from KeyCloak. To just pass it through to Parallels Secure Workspace, the following snippet can be used. Alternatively, adjust the rule above to return a different user attribute instead of the "userprincipalname" to provide a display name stored in one of the attributes of the Active Directory user.

c:[Type == ""]
 => issue(claim = c);

Configuring Parallels Secure Workspace as Relying Party Trust

Under ADFS > Relying Party Trusts, select the existing Parallels Secure Workspace configuration (or create one as described in the Admin Manual).

Next, adjust the Issuance Claim Rules to match this:

Create a “Transform an Incoming Claim” rule:

Create two "Passthrough" rules: one for UPN and one for Given Name. Without these rules, there will be no attribute statements in the XML response. In the Parallels Secure Workspace log files, this would lead to a similar error:

2023-03-21 13:31:47.418503+00:00 node01 awingu-api.service[/opt/awingu/awingu-core/virtualenv/bin/gunicorn:1299]: Unable to get username from SAML response.
NoneType: None

Example of a proper SAML response

A proper SAML response should look like this (from Microsoft ADFS to Parallels Secure Workspace):

<samlp:Response ID="_50ff6978-ae62-477c-a11e-bdbef3df0dd1" Version="2.0" IssueInstant="2023-03-21T10:32:37.897Z" Destination="" Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
    <Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"></Issuer>
        <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
    <Assertion ID="_703f3d95-17e0-40a7-af09-309f8c2bb05f" IssueInstant="2023-03-21T10:32:37.897Z" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
        <ds:Signature xmlns:ds="">
                <ds:CanonicalizationMethod Algorithm=""/>
                <ds:SignatureMethod Algorithm=""/>
                <ds:Reference URI="#_703f3d95-17e0-40a7-af09-309f8c2bb05f">
                        <ds:Transform Algorithm=""/>
                        <ds:Transform Algorithm=""/>
                    <ds:DigestMethod Algorithm=""/>
            <KeyInfo xmlns="">
            <NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"></NameID>
            <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
                <SubjectConfirmationData NotOnOrAfter="2023-03-21T10:37:37.897Z" Recipient=""/>
        <Conditions NotBefore="2023-03-21T10:32:37.897Z" NotOnOrAfter="2023-03-21T11:32:37.897Z">
            <Attribute Name="">
            <Attribute Name="">
                <AttributeValue>Some User/AttributeValue>
        <AuthnStatement AuthnInstant="2023-03-21T10:32:37.772Z" SessionIndex="_703f3d95-17e0-40a7-af09-309f8c2bb05f">



The below error occurred when Parallels Secure Workspace initiated the log-on procedure.
It did not occur when initiating the log-on from ADFS.


{"error": "The status code of the Response was not Success, was Requester -> urn:oasis:names:tc:saml:2.0:status:InvalidNameIDPolicy"}


In the Windows Event Viewer, the details can be seen in Applications and Services Logs > AD FS > Admin.

The SAML authentication request had a NameID Policy that could not be satisfied. 
Requestor: Workspace
Name identifier format: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress 
Exception details: 
MSIS7070: The SAML request contained a NameIDPolicy that was not satisfied by the issued token. Requested NameIDPolicy: AllowCreate: True Format: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress SPNameQualifier: . Actual NameID properties: Format: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified, NameQualifier:  SPNameQualifier: , SPProvidedId: . 

This request failed. 

User Action 
Use the AD FS Management snap-in to configure the configuration that emits the required name identifier.

To fix this: in ADFS > Relying Party Trusts: Select Parallels Secure Workspace. Edit the rule that transforms the UPN (incoming claim type) to Name ID (outgoing claim type). Make sure to specify Email as outgoing name ID format.



If only the KeyCloak claims provider should be used for authentication, the flow for the end user can be simplified and the step where the user has to select either "KeyCloak" or "Active Directory" can be skipped.

On the Microsoft ADFS server, run this PowerShell snippet (adjust the name of the relying party trust and claims provider):

Set-ADFSRelyingPartyTrust -TargetName "Workspace" -ClaimsProviderName @("KeyCloak")



Article background information

This documentation was initially created on the 22nd of March 2023.

The setup was performed using:


Was this article helpful?

Tell us how we can improve it.