microsoft / m365-compliance-connector-sample-scripts

MIT License
8 stars 7 forks source link

Script returns error #9

Open JWRoks opened 1 year ago

JWRoks commented 1 year ago

When running the script, I consistently get this error: Failure with StatusCode [Forbidden] and ReasonPhrase [Forbidden]

When running against a different tenant/connector setup, it works flawless. What could be causing this?

smcavinue commented 11 months ago

I get the exact same when testing this on a demo tenant, will try on a different tenant to validate there.

smcavinue commented 11 months ago

I get the exact same when testing this on a demo tenant, will try on a different tenant to validate there.

Just to update on this, testing on a different tenant worked ok. Seems limited to my demo tenant at the moment.

George-ADP commented 7 months ago

I'm having the same (reproduceable) problem...


-------------------------- PowerShell Script, output log ...

VERBOSE: Rows already ingested from File Count: 0
VERBOSE: Creating file C:\Users\<%username%>\AppData\Local\Tempctr###D\tmp0001.txt
VERBOSE: Created file with 2 records
VERBOSE: HTTP/1.1 POST with 268-byte payload
VERBOSE: received 1516-byte response of content type application/json
VERBOSE: Content encoding: utf-8
RetryCommand: C:\dev\HRDataConnector\Set-HRFile.v1a.ps1:333:17
Line |
 333 |                  RetryCommand -ScriptBlock {
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Failure with StatusCode [BadRequest] and ReasonPhrase [Bad Request]
RetryCommand: C:\dev\HRDataConnector\Set-HRFile.v1a.ps1:333:17
Line |
 333 |                  RetryCommand -ScriptBlock {
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Error body : Import status : Failed No Records were ingested We weren't able to process the file as it didn't contain the required column(s) :
     | "WORK_EMAIL","TERMINATION_ENTRY_DATE","ASSOCIATE_TERMINATION_DATE"
Write-Error: C:\dev\HRDataConnector\Set-HRFile.v1a.ps1:333:17
Line |
 333 |                  RetryCommand -ScriptBlock {
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Failure with StatusCode [BadRequest] and ReasonPhrase [Bad Request]
VERBOSE: Will retry in [60] seconds

-------------------------- Azure HR Data Connector, Admin Log Entry ...

Import completion time: 11/3/2023 8:33:02 AM (UTC)
Import status : Failed
No Records were ingested
We weren't able to process the file as it didn't contain the required column(s) : "WORK_EMAIL","TERMINATION_ENTRY_DATE","ASSOCIATE_TERMINATION_DATE"

-------------------------- Troubleshooting Steps ...

I tried many things:


-------------------------- Sample Data File, one of the many attempts ...

WORK_EMAIL,TERMINATION_ENTRY_DATE,ASSOCIATE_TERMINATION_DATE
sarad@contoso.com,2019-04-23T15:18:02.4675041+05:30,2019-04-29T15:18:02.4675041+05:30
pilarp@contoso.com,2019-04-24T09:15:49Z,2019-04-29T15:18:02.7117540