I have written an ArcGIS app using JavaScript API 4.23 accessing ArcGIS online (personal account). The code is stored in an .html file I have saved on my hard drive. I now want to point the app at my companies enterprise portal, but searching I cannot find a way to access the portal using JavaScript. Currently I login into my company portal UI pressing the blue button below (I do not need to enter any credentials).
1 Answer
You must register an "App" item in the Portal, which will give you an "appId", and then use esri/portal/Portal
and esri/identity/OAuthInfo
. Here is a tutorial that steps you through the steps: Access ArcGIS Online items using OAuth 2.0