I have created a geodatabase enterprise (mssql) feature class, enable archiving (not versioned) with globalid and publishing it with sync options.
After that copy the Portal Feature Layer URL and past to Arcgis Online New Item.
Opening the Survey connected to ArcGis Online I can see the feature layer referenced. But when I click in Create Survey I got the message Feature Service error Invalid Token Code 498.
The idea is to populate the data into the portal without using the VPN connection using a referenced arcgis online feature layer point to arcgis portal.
Survey 123 --- > Arcgis Online ---> Enterprise Geodatabase (ArcGis Portal).
in attachment more details about the process.
When you add a link to AGOL it is just that a link. It is used so that users can search for services and such using the AGOL interface. It still just points to your internal server. Plus how would AGOL be able to get to your server without VPN anyway? You can add a un/pass but it would still need a VPN. Maybe I am reading this wrong but if you could get to a server without VPN what would be the point of using a VPN?
In our server we have other enterprise geodatabases, services and other users groups that use the vpn. But for this specific application and SDE database we won't need the vpn security access. It is a public data but we need to keep it in our enterprise geodatabase (MSSQL) it will reach a larger number of people, and many of them do not have enough resources to connect to vpn (users account, good connection...).
I have done some testes using the arcgis online and portal collaboration, but no success too.
Yes but if the server itself is behind a firewall - it does not matter what is on it. Need VPN to get through the firewall. Otherwise you would not need a VPN at all.
For the service you created in ArcGIS Online does the URL of the REST endpoint start with utility.arcgis.com or is it the FQDN for your ArcGIS Server?
If it's the FQDN for your ArcGIS Server, when you add the service to your ArcGIS Online organization you need to store credentials with the service so that ArcGIS Online can create the utility proxy. Please see this link for more information (the workflow is the same even with federated ArcGIS Server services being added to ArcGIS Online). When you added the service in ArcGIS Online if you were not prompt to store credentials please see this link for more information.
That is correct, if you want a survey that's in ArcGIS Online to submit to an ArcGIS Server feature service ArcGIS Online needs to be able to communicate with that feature service in order to submit data to it. For workflows where you have an ArcGIS Enterprise organization behind your firewall I would suggest using a distributed collaboration to create a copy of the feature service in ArcGIS Online and let the collaboration sync the service between the two organizations.
That doesn't really solve my problem then. I want to keep the data 'public' inside my network so they don't have to login to fill out the survey, but we don't want it PUBLIC public on AGOL...thanks for the confirmation.
And the reason I want the survey on AGOL is to be able to use Power Automate and webhooks to send emails.
What you could do on the settings of the hosted feature layer created in ArcGIS Online is set the permissions so that editors cant see any features and can only add new features. This will disable query on the REST endpoint of the feature service.