Hi Nils,
Sorry to wake a three year old thread. I was having the same question and your response prompted me to look further.
It seems you "cannot" use app logins for spatial analysis services.
Please have a look at the capabilities table in this link ArcGIS Security and Authentication | ArcGIS for Developers under app logins. It clearly states app logins cannot be used with spatial analysis services.
For Spatial Analysis Services see here
In order to use the analysis tasks, the administrator of your organization needs to grant you certain privileges. To use any of the analysis tools, you will need the Spatial Analysis
privilege. If the output of your task is a hosted feature service, as opposed to a feature collection, you also need the two following privileges:
Create, update, and delete
contentPublish hosted features
Certain tasks need additional privileges such as Network Analysis
and GeoEnrichment
. If the task requires additional privileges, they will be listed in the task documentation.
Also
App login can be used to access any of these services:
See Here
Any reason why Spatial Analysis isn't available for App Login?
Sorry I don't have an answer for this.