If you want to test things, here's a stripped down JS API example that our tech gave us. You just need to adjust the relevant code bits for your environment:
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<title>
SAML OAuth configuration | Sample | ArcGIS API for JavaScript 4.20
</title>
<link
rel="stylesheet"
href="https://js.arcgis.com/4.20/esri/themes/light/main.css"
/>
<script src="https://js.arcgis.com/4.20/"></script>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
require(["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/identity/IdentityManager", "esri/identity/OAuthInfo"], (
Map,
MapView,
FeatureLayer,
esriId,
OAuthInfo
) => {
var info = new OAuthInfo({
appId: "portal App ID from Add Item-Application",
portalUrl: "Your Portal URL",
popup: false
});
esriId.registerOAuthInfos([info]);
esriId.getCredential(info.portalUrl + "/sharing");
const map = new Map({
basemap: "hybrid"
});
const view = new MapView({
container: "viewDiv",
map: map
});
/********************
* Add feature layer
********************/
const featureLayer = new FeatureLayer({
url:
"Your Portal Feature Layer URL"
});
map.add(featureLayer);
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>