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 1
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
-
Thank you that doesn't work. I have tried that.CGarden– CGarden2022年08月12日 12:00:44 +00:00Commented Aug 12, 2022 at 12:00
Explore related questions
See similar questions with these tags.