To collect information from either ArcGIS Online or Portal for ArcGIS, you need an App ID to complete the access credentials. The process is the same for ArcGIS Online and for Portal for ArcGIS, so only the instructions for Portal for ArcGIS are given below.
To add and register an application in Portal for ArcGIS:
1.Open the Portal for ArcGIS page and select My Content.
2.Click New Item > Application.
3.Choose Other application and click Next.
4.In the New Item window, select Other application.
5.Enter a Title for the application. For example, "Analytics Access".
6.Click Next. The application's details page opens.
7.Click the Settings tab and App Registration area.
8.Click Registered Info to see the registered information.
9.Copy the App ID to paste into Analytics when adding a resource.
If you are setting up AGOL/Portal as a new security provider, you will acquire the App Secret from the Registered Info section and use it in when adding a security provider.
The Redirect URI is copied from the Add Security Provider form and pasted in the Registered Info > Redirect URI's field.
10.Click Update to paste the Redirect URI from Analytics. To collect data from your organization's account, the App must contain the redirect URI, which you will find in Analytics > Settings > Add Resource > ArcGIS Online (or Portal for ArcGIS). See Add a Portal.