This migration guide describes how to switch to Fingerprint Azure integration v2 if you are currently running the first version. The migration steps ensure zero downtime.Documentation Index
Fetch the complete documentation index at: https://docs.fingerprint.com/llms.txt
Use this file to discover all available pages before exploring further.
Improvements over v1
- New runtime and consumption plan: The functions now run using the new Flex Consumption plan and runtime 4.x.
- Updated Node runtime: The v1 functions run on Node 20. The v2 functions run on Node 24.
- JavaScript agent v4 Support: The v2 version of the integration fully supports the JavaScript agent v4 while maintaining backward compatibility with the JavaScript agent v3.
Migration overview
- Deploy Azure integration v2 on a new path. You will have v1 and v2 running in parallel.
- Verify that the new integration works.
- Switch from v1 to v2 proxy integration.
- Optional: Migrate to JavaScript agent v4.
- Optional: Remove the old integration.
Step 1: Deploy Azure Proxy Integration v2 on a new path
Step 1.1: Issue a proxy secret
You need a proxy secret to authenticate requests to the Fingerprint API from your Azure function.- Go to the Fingerprint dashboard and select your workspace.
- In the left-side menu, go to API keys.
- Click Create proxy key.
- Give it a name, for example,
Azure proxy integration v2. - Click Create API Key.
Step 1.2: Choose a path variable
Choose a value forFPJS_ROUTE_PREFIX_v2 that is different from the one used by your v1 integration. Use a random string rather than a descriptive name, some ad blockers block URLs containing fingerprint-related terms like “fingerprint”, “fpjs”, or “track”.
You will use this value in the deployment template and when configuring the JavaScript agent.
Step 1.3: Deploy the Azure function
Click here to open the template deployment dialog. Basics step- Select your Azure Subscription.
- Select or create a Resource group. We suggest using a separate resource group for the v2 integration.
- Specify Region and Location.
- Set Function App Name, for example,
azure-frontdoor-proxy-app-v2. - Click Next.
- Set Route Prefix to your
FPJS_ROUTE_PREFIX_v2value. - Click Next.
- Set Proxy Secret to the proxy secret generated in Step 1.1.
- Click Review + Create, then Create.
Step 1.4: Verify the deployment
- After deployment completes, click Go to resource group.
- In the resources list, find your Function App using the Type column and click it.
- Click Overview in the left-side menu and confirm that both the
proxyandmanagementfunctions are listed. - Click proxy, then Get Function URL and copy the
default (function key)URL. - Build the status page URL by replacing
{*restOfPath}withFPJS_ROUTE_PREFIX_v2/statusand open it in your browser. If it says All environment variables are set, your function is running correctly.
Step 1.5: Add a route to your Front Door distribution
Since you already have a Front Door distribution from the v1 integration, add a new route to it for v2.- Open your Front Door distribution.
- Go to Settings → Front Door manager.
- Inside your Front Door endpoint, click Add a route.
- Set Name to something descriptive, like
fingerprint-integration-v2-route. - Keep Enable route selected.
- Set Domains to the same domain used by your v1 integration.
- In Patterns to match, add
/FPJS_ROUTE_PREFIX_v2/*and/FPJS_ROUTE_PREFIX_v2. - Set Accepted protocols to
HTTPS only. - Keep Redirect all traffic to use HTTPS selected.
- Click Add a new origin group:
- Set Name to something descriptive, like
fp-origin-group-v2. - Click Add an origin:
- Set Name to something descriptive, like
fp-origin-v2. - Set Origin type to
App services. - Set Host name to the function app deployed in Step 1.3.
- Click Add to save the origin.
- Set Name to something descriptive, like
- Keep Enable health probes selected.
- Set health probe Path to
/FPJS_ROUTE_PREFIX_v2/status. - Set Protocol to
HTTPS. - Set Probe method to
GET. - Click Add to save the origin group.
- Set Name to something descriptive, like
- Set Forwarding protocol to
HTTPS only. - Click Add to save the route.
Step 2: Verify that the integration works
At this point, you should have both v1 and v2 integration running side by side. You can go to their respective status pages to confirm:yourwebsite.com/FPJS_ROUTE_PREFIX/statusshould display a status page of Azure integration v1.x.yourwebsite.com/FPJS_ROUTE_PREFIX_v2/statusshould display a status page of Azure integration v2.x.
JavaScript
Step 3: Switch from v1 to v2
You have two options for migrating from your v1 integration to v2. Choose the one that suits you best depending on your deployment options:- Option A (recommended): Update your JavaScript agent configuration to point to the v2 path. If you can update your client-side code, choose this option: it is simple, requires no downtime, and is easy to roll back.
- Option B: Update the Front Door distribution to route the v1 path to the v2 function. Choose this if you cannot update your client-side code, for example, because you are serving a mobile app and need to wait for users to upgrade.
Option A: Update your client agent to use the v2 Front Door path (recommended)
Update your client agent to use the v2 integration on the new path, as shown in the previous step. Both integrations remain fully operational during the switch, making it easy to roll back in case of any problems. If you are using our NPM package or client library, you can even use the v1 integration as a fallback for v2:JavaScript
Option B: Update the existing v1 route to use the v2 function
If you can’t update your client-side code and can’t afford downtime, you can update your v1 proxy route configuration to match the v2 configuration in the Azure UI.- Navigate to the deployed v2 function app in the Azure portal.
- In the left sidebar, expand Settings and click Environment Variables.
- Locate
fpjs_route_prefixvariable and set it to the same value used by your v1 integration. (FPJS_ROUTE_PREFIX). - Click Save.
- Go to your Front Door distribution.
- On the right side in the Properties tab, locate your Endpoint hostname and click it.
- Locate the route of your Azure Integration v1 and click it.
- Add an additional pattern in the Patterns to match:
/FPJS_ROUTE_PREFIX - Replace Origin group with the new origin group that you’ve created for your v2 integration.
- If you have caching enabled, set Query string caching behavior to
Ignore Query String. - Click Update.
Step 4: Migrate to JavaScript agent v4
At this point, you can start migrating your application to use the new JavaScript agent v4.JavaScript
Step 5: Remove the old integration
When all your client application agents use the new integration, you can remove the old integration.- In your Front Door distribution, remove the origin group of the v1 integration. If you went with option A, you can also remove the route of the v1 integration.
- Locate the resource group of the v1 integration.
- If during the v1 deployment you created a new resource group and use it only for the v1 integration, simply delete it.
- Otherwise follow steps below to only delete the v1 resources without deleting the resource group:
- In the resource group page, in the left sidebar expand Settings and click Deployments.
- Locate the deployment of the v1 integration, select the checkbox and click Delete.