@colin_mckibben
Ok, So from the other thread, I am able to create a source and the account schema looks correct.
These are the properties of the schema
id,name,givenName,familyName,e-mail,location,manager,groups
this is 1 of the many objects in the JSON, that are used to create the csv.
id: '[email protected]',
name: 'Asive.Marele',
givenName: '',
familyName: '',
'e-mail': '[email protected]',
location: '',
manager: '',
groups: ''
The headers match the above schema and the csv opens in numbers correctly. etc…
Then I use that csv to create a Binary/Buffer and send it over in FormData.
const loadAccountCSVIntoSailpoint = async (request, bearerToken, legacySourceId, filePath) => {
const formData = new FormData()
const file = await readFileSync(filePath)
formData.append('disableOptimization', 'true')
formData.append('file', file, 'aceiss.csv')
const apiRequest = buildMultiPartRequest(request, `source/loadAccounts/${legacySourceId}`, bearerToken, formData)
try {
// POST cc/api/source/loadAccounts/legacySourceId
return executeRequest(request, apiRequest)
} catch (err) {
return errorMessage(request, err)
}
}
Here is the request payload
{
url: 'https://eu-partner27.api.identitynow.com/cc/api/source/loadAccounts/212343',
headers: {
'Retry-After': 1,
Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiJhMTE5Yjg3OS1kZWI2LTQ1NDgtOGNhMS1jYjQ3OTJlOGFmY2IiLCJwb2QiOiJzdGcwMS1ldWNlbnRyYWwxIiwic3Ryb25nX2F1dGhfc3VwcG9ydGVkIjpmYWxzZSwib3JnIjoiZXUtcGFydG5lcjI3IiwiaWRlbnRpdHlfaWQiOiIyYzkxODA4MzgxM2E0MjU5MDE4MTNlNTE0NDc3NTRlOCIsInVzZXJfbmFtZSI6IkdhcnkuQmljY2FyZCIsInNjb3BlIjpbIkJnPT0iXSwic3Ryb25nX2F1dGgiOnRydWUsImV4cCI6MTY3OTkyOTA0OSwiYXV0aG9yaXRpZXMiOlsiT1JHX0FETUlOIiwic3A6dXNlciJdLCJqdGkiOiJEMUNhODFPS2RxNGlRZHhjN2VBT0RabV81d0UiLCJjbGllbnRfaWQiOiI1MGFkYTkzNjE0NWU0OTc1YWM4ZTlmNzVhM2FjMDc0YyJ9.AHOR5OW2Tob5cDsHcuGEqL8fWaPKR53FH6BURpPgh0c',
'Content-Type': 'multipart/form-data',
'Cache-Control': 'no-cache'
},
method: 'post',
data: FormData {
_overheadLength: 327,
_valueLength: 2478,
_valuesToMeasure: [],
writable: false,
readable: true,
dataSize: 0,
maxDataSize: 2097152,
pauseStreams: true,
_released: false,
_streams: [Array],
_currentStream: null,
_insideLoop: false,
_pendingNext: false,
_boundary: '--------------------------470468635821468462563621'
}
}
{
_overheadLength: 327,
_valueLength: 2478,
_valuesToMeasure: [],
writable: false,
readable: true,
dataSize: 0,
maxDataSize: 2097152,
pauseStreams: true,
_released: false,
_streams: [
'----------------------------470468635821468462563621\r\n' +
'Content-Disposition: form-data; name="disableOptimization"\r\n' +
'\r\n',
'true',
[Function: bound ],
'----------------------------470468635821468462563621\r\n' +
'Content-Disposition: form-data; name="file"; filename="sailpoint-09b49ac0e4cf4b5593c3f3e71b2738ee-accounts-1679885850288.csv"\r\n' +
'Content-Type: text/csv\r\n' +
'\r\n',
<Buffer 69 64 2c 6e 61 6d 65 2c 67 69 76 65 6e 4e 61 6d 65 2c 66 61 6d 69 6c 79 4e 61 6d 65 2c 65 2d 6d 61 69 6c 2c 6c 6f 63 61 74 69 6f 6e 2c 6d 61 6e 61 67 ... 2424 more bytes>,
[Function: bound ]
],
_currentStream: null,
_insideLoop: false,
_pendingNext: false,
_boundary: '--------------------------470468635821468462563621'
}
and then the error back from Sailpoint ( the message part ) I can put the whole thing in here if you want
[
{
localeOrigin: 'DEFAULT',
locale: 'en-US',
text: 'An internal fault occurred.'
},
{
localeOrigin: 'REQUEST',
locale: 'en-US',
text: 'An internal fault occurred.'
}
]
So, I think to this point I have implemented what you have suggested ( unless you see something im missing)
But the error is the same.