OpenFIT SAML Integration with Microsoft Entra ID

Created by Enda Madden, Modified on Wed, 17 Sep at 1:17 PM by Enda Madden

Introduction

This guide provides step-by-step instructions to configure SAML-based Single Sign-On (SSO) integration between Microsoft Entra ID (Azure AD) and OpenFIT. This setup ensures secure authentication and role-based access control for users accessing OpenFIT.

Prerequisites

Before you begin, ensure you have:
  • Access to Microsoft Entra ID (Azure AD) with sufficient permissions to create Enterprise Applications
  • OpenFIT Federation Metadata endpoints access
  • Understanding of OpenFIT roles information (provided in the application setup)


OpenFIT Federation Metadata Endpoints

Test Sandbox:

https://of-internal-ids.azurewebsites.net/FederationMetadata/2007-06/FederationMetaData.xml

Production:

https://ids.openfit.care/FederationMetadata/2007-06/FederationMetaData.xml


Step 1: Create the Enterprise Application in Entra ID

  1. Login to the Azure portal
  2. Navigate to Microsoft Entra ID > Manage > Enterprise Applications
  3. Click 'New Application' > 'Browse Microsoft Entra Gallery'
  4. Select 'Create your own application'
  5. Enter the application name (e.g., OpenFIT)
  6. Choose 'Integrate any other application you don't find in the gallery (Non-gallery)'
  7. Click 'Create'


Step 2: Configure SAML-based Single Sign-On

  1. Open the newly created Enterprise Application
  2. Go to Manage > Single Sign-On
  3. Select 'SAML' as the sign-on method
  4. Fill in the following configuration details:


SAML Configuration Details

FieldValueRequired
Identifier (Entity ID)https://ids.openfit.careYes
Reply URL (Assertion Consumer Service URL)https://ids.openfit.care/api/SAML/AssertionConsumerServiceYes
Logout URLhttps://ids.openfit.care/api/SAML/LogoutConsumerServiceOptional
Sign-on URLOptionalNo
Relay StateOptionalNo
Important: For testing environments, replace https://ids.openfit.care with https://of-internal-ids.azurewebsites.net in all URLs above.


Step 3: Configure Attributes & Claims

Ensure the following attributes and claims are configured correctly:

Required Claims Configuration

Claim NameSource AttributeDescription
givennameuser.givennameUser's first name
surnameuser.surnameUser's last name
emailaddressuser.mailUser's email address
nameuser.userprincipalnameUsername in OpenFIT
roleuser.assignedrolesOpenFIT role assignment
Unique User Identifieruser.userprincipalnameUnique identifier
groupsuser.groupsUser group memberships
Critical: Ensure the token injects the group (role) name and not the ID. This is a common mistake that will cause authentication failures.


Step 4: Upload and Manage SAML Certificates

  1. In the SAML Certificates section, download the Federation Metadata XML
  2. Provide the 'App Federation Metadata URL' to OpenFIT support for registering the application
  3. Ensure the certificate is valid (renew before expiration to avoid outages)


Step 5: Configure App Roles in OpenFIT

  1. Navigate to Microsoft Entra ID > Manage > App registrations > OpenFIT > Manage > App roles
  2. Add the following roles as defined by OpenFIT:


Required OpenFIT Roles

Role NameDescriptionPermissions Level
OpenFitAdministratorFull system administratorHighest
OpenFitLocalAdminLocal administratorHigh
OpenFitClinicianSupervisorClinical supervisor roleMedium
OpenFitClinicianStandard clinician accessStandard


Ensure that each role is assigned to the appropriate users or groups as required.


Step 6: Assign Users and Roles

  1. Navigate to the Enterprise Application > Manage > Users and groups
  2. Assign the users or groups to the appropriate roles
  3. Validate that role assignments are correctly reflected in the SAML token


Step 7: Testing the Integration

Testing Checklist:
  1. Use the 'Test' button in the SAML Single Sign-On configuration to validate the setup
  2. Ensure that the login redirects to the OpenFIT sign-in page
  3. Verify that user attributes and roles are passed correctly
  4. Confirm that users can access OpenFIT with the assigned roles


Troubleshooting

Common Issues

Role Claims Not Working:
  • Verify App Roles are created in App registrations (not Enterprise Applications)
  • Check that users are assigned to roles in Enterprise Applications > Users and groups
  • Ensure the role claim is mapped to user.assignedroles
URL Mismatch Errors:
  • Verify the Reply URL includes /api/ in the path
  • Use test environment URLs for initial testing
  • Check Entity ID matches exactly
Certificate Issues:
  • Download and provide the correct Federation Metadata XML to OpenFIT support
  • Monitor certificate expiration dates
  • Test after certificate renewal


Next Steps

After completing this configuration:

  1. Contact OpenFIT support with your Federation Metadata URL
  2. Wait for OpenFIT to provision your organization
  3. Conduct end-to-end testing with actual users
  4. Plan for certificate renewal schedules
  5. Document any organization-specific customizations

Need Help? If you encounter issues during configuration, contact OpenFIT support support@openfit.care with:
  • Your Federation Metadata XML file
  • Screenshots of your SAML configuration
  • Specific error messages
  • Details about which step is failing

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article