Hi Sunshine
I have managed to get the viewshed analysis tool to work. You need to add the elevation service or what ever service that you are trying to us to you Portal or ArcGIS online subscription. I have attached the following url and details below.
-----------------------------------------------
Elevation
The portal has two elevation services: an elevation utility service used for analysis and an elevation service used for 3D in the scene viewer.
For analysis, you can add the Elevation Service provided by Esri to your portal. This will use the credentials from an ArcGIS Online account that has credits associated with it. Alternatively, you can configure a custom elevation utility service to use if your portal is not connected to the Internet.
For the scene viewer, if your portal is not connected to the Internet or you have higher resolution data you want to use for the portal's scene viewer elevation service, you can publish one from ArcMap and update the portal's Elevation3D Service setting.
-----------------
This is how you add a service to your ArcGIS Portal or ArcGIS Online Account.
----------------
Configure ArcGIS Online utility services—Portal for ArcGIS (10.4) | ArcGIS for Server
Configure ArcGIS Online utility services
ArcGIS 10.4 on Windows
|
Other versions
You can configure your portal to use utility services from ArcGIS Online. If you would like to use a utility service provided byEsri, you must have an ArcGIS Online organizational account. The account must have credits associated with it and the correct permissions to use the utility services.
- Sign in to the portal website as an Administrator of your organization and click My Organization > Edit Settings > ArcGIS Online.
- Select the utility services you would like to configure with the portal.
- Enter the credentials for the ArcGIS Online account to be used for the utility services.
- Click Configure.
The utility services you select will be configured with the portal. An item is created in the portal that stores the ArcGIS Onlineaccount credentials with it. Each item is shared with the portal's organizational members at the time it is created. You can view the items or edit their sharing properties in My Content.
---------------
I hope that this help solver your problem.