1
0
Форкнуть 0
Includes the scripts to upload the data to the hr connector jobs configured on m365.
Перейти к файлу
nirav pranami 9d76aada3e
Create upload_signals.ps1
add upload scrip generic to all signals
2021-08-24 10:11:10 +05:30
.gitignore Initial commit 2020-01-06 06:11:19 +00:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-01-05 22:11:22 -08:00
LICENSE Initial LICENSE commit 2020-01-05 22:11:23 -08:00
README.md add the powershell script to upload termination records 2020-01-06 12:31:20 +05:30
SECURITY.md Initial SECURITY.md commit 2020-01-05 22:11:26 -08:00
upload_signals.ps1 Create upload_signals.ps1 2021-08-24 10:11:10 +05:30
upload_termination_records.ps1 force tls12 protocol 2020-09-22 15:29:45 +05:30
upload_termination_records_GCC.ps1 add tls12 enforcing to the scripts 2021-06-07 15:09:42 +05:30
upload_termination_records_ITARL5.ps1 add tls12 enforcing to the scripts 2021-06-07 15:09:42 +05:30
upload_termination_records_ITAR_L4.ps1 add tls12 enforcing to the scripts 2021-06-07 15:09:42 +05:30

README.md

The script would read data from a csv file and upload it to the configured hr connector job.

Creating AAD APP

Create you AAD APP https://docs.microsoft.com/en-us/azure/kusto/management/access-control/how-to-provision-aad-app

Note the following

  • APP_ID (aka Application ID or Client)
  • APP_SECRET (aka client secret)
  • TENANT_ID (aka directory ID)

Create your job on SCC

Provide required Details at HR Connector and create a job and note the JOB_ID

Run the powershell script

.\upload_csv_for_hr_termination.ps1 -tenantId <TENANT_ID> -appId <APP_ID>  -appSecret <APP_SECRET>  -jobId <JOB_ID>  -csvFilePath <CSV_FILE_PATH>

CSV_FILE_PATH should be the local file path for the csv data to upload.

If the last line reads Upload Successful, the script execution was successful.

The script would retry over a period of about 15 mins if it encounters any transient failures.

CSV criteria

  • the columns names should match the ones setup while creating a job

  • the dates should be in yyyy-mm-ddThh:mm:ss.nnnnnn+|-hh:mm format. Sample dates as below

    • 2008-09-15T15:53:00+05:00
    • 2008-09-15T15:53:00Z

    Sample CSV

    ResignationDate UserEmailAddress LastWorkingDate
    2019-04-29T15:18:02.4675041+05:30 testing1@microsoft.com 2019-04-23T15:18:02.4675041+05:30
    2019-04-24T09:15:49Z testing2@microsoft.com 2019-04-23T15:18:02.4675041

Common Errors and resolution

  1. JOB_ID might be incorrect. Make sure it matches the one configured on SCC

RetryCommand : Failure with StatusCode [Forbidden] and ReasonPhrase [jobId and corresponding appId do not match.]

  1. APP_ID or TENANT_ID might be incorrect.

RetryCommand : {"error":"unauthorized_client","error_description":"AADSTS700016: Application with identifier '689412fa-4b24-475a-ab39-32eca848b6f2' was not found in the directory '85ee0691-54d7-49f1-b879-3ce53c2a8549'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.}