Skip to main content
Nintex Community Menu Bar
Knowledge Base

SPFx Forms API Access Token using Multi-factor authentication

  • March 28, 2025
  • November 24, 2025 at 12:48 PM
  • 0 replies
  • 233 views
  • Translate All

Forum|alt.badge.img+9

Topic

The following steps will allow you get a access token for use with the Nintex Forms SPFx API’s when MFA is required.


Instructions 

  1. Obtain the Microsoft.Identity.Client.dll from the NGet package, by extracting it from the downloaded package lib\<net6.0 or net472>\Microsoft.Identity.Client.dll. 
  1. In the Entra ID app, under the Authentication, add a new Redirect URIs : 
  1. Platforms: Mobile and desktop applications 
  1.  Custom redirect URIs: http://localhost 
  1. In the same directory of the dll, execute this powershell script: 

 

Add-Type  -Path ".\Microsoft.Identity.Client.dll" 

 

$ClientId = "<Client ID>" 

$TenantId = "<Tenant ID>" 

$RedirectUri = "http://localhost" 

[string[]] $Scopes = 'https://<tenant>.sharepoint.com/.default' 

 

$App = [Microsoft.Identity.Client.PublicClientApplicationBuilder]::Create($ClientId). 

     WithAuthority("https://login.microsoftonline.com/$TenantId/v2.0"). 

     WithRedirectUri($RedirectUri). 

     Build() 

$Result = $App.AcquireTokenInteractive($Scopes).ExecuteAsync().GetAwaiter().GetResult() 

$Result.AccessToken