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&re...' 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.
It would be great to be able to use the credentials of the user logged into SharePoint to authenticate their access to the Azure function. The adal.js and msal.js libraries that Microsoft has put out were made for this type of thing.
The Azure function implements some business logic such as retrieving data from a backend SQL db based on information entered into the form, or returning members of an AAD Group for a drop down, or getting purchase authorization amounts based on user, etc.
I've the same problem, when I try to call an Azure Function authenticated with Azure AD from JQuery in a classic Nintex Form. Do you have any updates in how to send the credentials logged into SharePoint in the request?
I've CORS enabled and configured with Nintex Tenant, but when I try to call the Azure Function and send the credentials, it redirects to https://login.windows.net and throw an error:
Access to XMLHttpRequest at 'https://login.windows.net/...' (redirected from 'https://...) from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.