AEM Forms Forms as a Cloud Service with Microsoft OneDrive
[AEM Forms as a Cloud Service]{class="badge informative"}
Store adaptive form data in Microsoft OneDrive.
Transcript
Hi, in this video we will take a look at integrating AEM Forms cloud service with Microsoft OneDrive. So before we start the integration, we need to create and register an app in portal.azure.com. So I’ve logged into my portal account, and here I’m going to click on App Registrations. Click on New Registration to create your new app. Give a meaningful name to the app. I’m going to call it AEM Forms with OneDrive. Click on Register. Make a note of the application client ID. We would need this later on, so I’ll copy that and paste it into my notepad here. And also we need to add a redirect URI here. So click on Add Redirect URI. Add a platform here. Click on Web, and the redirect URI will look something like this.
The only thing that will change for your instance will be the name of the server. The rest of the string will remain the same. So this is the redirect URI.
Click on Configure.
The next thing, if you want, you can do is to add a secret key. This is completely optional based on your business needs. So let’s show you how to add a client secret key here. Click on New Client Secret. Give a name here called AEM Forms Secret Key, and it expires in 180 days. Click on Add.
So make a note of this value here. Copy this value. We will need this when you are configuring AEM Forms with OneDrive. So that’s the client ID, and that’s the client secret ID. So now our app registration is complete. The next step we need to do is to use these credentials and configure a cloud services configuration in AEM Forms Cloud Service. Now that we have created and registered our app in Azure Portal, the next step we need to do is to create a cloud services configuration in AEM Forms Cloud Service. So I have logged into my AEM Forms Cloud Service UI app, going into the tools, and I’m going into the configuration browser to create a folder to hold our configuration. So I’m going to create a new folder here. Call it OneDrive, and make sure you select Cloud Configurations here.
Create. Then I go back into my Cloud Services here.
And select the Microsoft OneDrive configurations, and select the folder in which you want to create your configuration. So in my case, it’s going to be OneDrive. Click on Create. Give a meaningful title. Save Form Data in OneDrive. Client ID is what we got from our application. That’s the client ID here.
Client ID.
And then the client secret. Remember, we got the client secret when we created the app. So this is the client secret here. So copy this.
And then we need an OAuth URL. The OAuth URL can be got from your Azure portal. So when you log into your portal Azure, go into the overview. And from there, you click on the endpoints. OAuth 2.0 authorization endpoints. So copy this and paste it over here.
Okay, now you click on Connect here.
Everything goes well. You should get this dialog. Click on Accept. The authentication was successful, but you’re not done yet. So here it asks you which folder you want to store your form submissions. You can take the default folder that is selected here, or you could create your new folder and select that one. I’m gonna select this default folder and click on Create.
So now our Cloud Services configuration is created. The next step to do is to associate this endpoint when you’re submitting an adaptive form and that data will be stored in your OneDrive.
Now that we have created our Cloud Services configuration, the next step we need to do is to associate that Cloud Services configuration with our adaptive form to submit the form to OneDrive. So for that, I have created a form. I’ll make sure the form’s configuration container is the same container in which we created our Cloud Services configuration. In this case, it’s OneDrive.
And in the form itself, we need to specify the submission options. So click on the form, open the form here.
And open up the form container properties.
Go to the submission options here and Submit actions. Make sure you select Submit to OneDrive. That’s one of the options now. And you select the storage configuration here. Save form data in OneDrive. So you can also select to include the document of record. In this case, we are not gonna do that. So save your settings here and then preview the form. So I’m gonna preview the form here.
And these are the values. I’m going to select here and click on Submit. So when the form is successfully submitted, this entry or this data will be stored in our OneDrive. And to check that, I’ve logged into my office.com. Go into the OneDrive here and select Forms out of the box, Storage adaptive forms, OneDrive with forms.
It is stored under the folder today’s 2.15. And that’s the submission here. So under that, there will be a data.xml and metadata.json. So click on data.xml. You will see the data that was stored in this OneDrive. So this is how you can integrate AEM Forms cloud service and store the submission in OneDrive.
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69