Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[SuccessFactors] Check if IAS is activated for a tenant

Go to Upgrade Center, select Platform in the Filter By Dropdown. In the Optional Upgrades Column, search for:

Initiate the SAP Cloud Identity Services Identity Authentication Service Integration

If the entry exists, IAS is not yet set up. If it does not exist, the IAS configuration is probably already done.

[CAP] Check if User exists in SuccessFactors

To check if a record exists, you can simply use the HEAD query.

“HEAD is almost identical to GET, but without the response body.” (https://www.w3schools.com/tags/ref_httpmethods.asp)

Unfortunately, there is no shortcut in CAP for a HEAD query, so simply use send with method HEAD.

    sfsfSrv = await cds.connect.to('sfsf')

    try {
        await sfsfSrv.send('HEAD', `/User('${userId}')`)
        return true  // status 200
    } catch (err) {
        return false // status 404
    }