Survey123 Power Automate - How to generate "Token" securely without exposing "Credential"

940
3
09-22-2023 12:30 AM
rsun_TQB
Frequent Contributor

Dear All,

Does anyone know how to generate tokens from Survey123 using HTTP action using Power Automate?

rsun_TQB_0-1695367433162.png

I know that if I use the following as "body", I can generate a token without issues...but it against best practice.

username=USERNAME&password=PASSWORD&f=json&referer=https://survey123.arcgis.com/surveys?portalUrl=https://yourportal.com/portal

 

Any of the following authentication method will work? I tried "Basic", but it didn't not work...but return 400 error asking for username and password.

rsun_TQB_1-1695367824885.png

 

 

Are any tutorial or blog post regarding this? I need to generate "token" for public facing survey securely using Power Automate, since public facing survey will not have "token" generated for Survey123 "Create Report" action.

 

Thanks a lot!

Reno

 

3 Replies
abureaux
MVP Frequent Contributor

You can use the new built in action rather than custom HTTP for most operations now:

abureaux_0-1695393193735.png

If you are using an old Custom Connector in Power Automate, then this feature isn't available to you yet. After a quick and easy update, you can make use of this new action.

rsun_TQB
Frequent Contributor

Hi @abureaux ,

Thanks a lot! I think that I actually had no problems with "Create Report" but more is for processing "attachments" from submitted survey. My automation uploads them to OneDrive, and copy it to SharePoint Online. Survey123 attachmenrs in Microsoft Power Automate (esri.com)

rsun_TQB_0-1695412374408.png

Any solutions for requesting token securely without exposing credential in the body of HTTP (https) reqeust? 

Cheers,

Reno

0 Kudos
abureaux
MVP Frequent Contributor

ahh.

Well, Azure Key Vault is a possible solution for obfuscating login data in Power Automate. I don't have experience with this though as we are just getting our Azure environment set up.

0 Kudos