I am trying to call an Azure Function authenticated via AAD from a Nintex Form via javascript. I have code to call an Azure Function via an API Key but would prefer to use the User's credentials. I have looked at adal.js and msal.js. I have gotten very close to getting it working, but have run into a brick wall in each case.
For adal.js, the authentication tries to use an iframe from the Nintex form. This resulted in:
'https://login.microsoftonline.com/common/oauth2/authorize?client_id=<removed>&response_type=token&redirect_uri=<removed>&resource=https%3A%2F%2Fgraph.microsoft.com' in a frame because it set 'X-Frame-Options' to 'deny'.
Something similar happened with msal.js when using silent authentication.
Has anyone tried to do this yet? Any help would be greatly appreciated.