cancel
Showing results for 
Search instead for 
Did you mean: 
Marker
Nintex Newbie

How do you call an Azure function using authentication from an O365 Nintex Form

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&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.

Labels: (1)
Tags (1)
Reply
3 Replies
Community Manager Community Manager
Community Manager

Re: How do you call an Azure function using authentication from an O365 Nintex Form

Unfortunately, this is a very specific need. Javascript in Classic form may be your best bet. Why are you attempting to call an Azure function from a form?

0 Kudos
Reply
kdelcastillo
Nintex Newbie

Re: How do you call an Azure function using authentication from an O365 Nintex Form

It would be nice to have secure communications to Azure from the form. I can see many uses for this.

Reply
Marker
Nintex Newbie

Re: How do you call an Azure function using authentication from an O365 Nintex Form

I have code to be able to call an Azure function from a Nintex form using an API key. This was done using Javascript in a Classic form. Unfortunately, this exposes the API key in the javascript.

 

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.

0 Kudos
Reply