Tools4everBV / HelloID-Conn-Prov-Target-AFAS-Profit-Users

AFAS Profit - Target (Users)
0 stars 1 forks source link

PSv2 connector: exception for license threshold is not caught #16

Closed T4ESamuel closed 3 months ago

T4ESamuel commented 5 months ago

The following exception does not get caught within the audit logging:

{ "Data": { "Acon": "false", "Abac": "false", "Acom": "false", "OcUs": "false", "PoMa": "false", "AcUs": "false", "Gebruiker": null, "Medewerker": "1000000", "MtCd": "1", "Pw": "GHJKL!!!23456gfdgf", "Site": "false", "Nm": "test van test (1000000)", "InSi": "true", "Awin": "false", "Upn": test.van.test@test.com, "UsId": "93448. 1000000", "EmAd": test.van.test@test.com }, "PreviousData": null, "AccountReference": "Unknown", "AuditLogs": [ { "Action": "CreateAccount", "Message": "Error creating AFAS user [93448.1000000]. Error Message: Door deze actie zouden meer InSite gebruikers ontstaan dan volgens je licentie is toegestaan.\r\nJe hebt xxx InSite gebruikers toegevoegd en je mag er maar xxx toevoegen.\r\n\r\nJe kunt geen nieuwe InSite gebruiker toevoegen of bestaande gebruikers InSite gebruiker maken.\r\n\r\nMogelijke oplossing:\r\nA. Vink het veld 'InSite' uit bij de huidige gebruiker.\r\nB. Blokkeer een of meer andere gebruikers die alleen toegang hebben tot InSite.\r\n\r\nLet op, Systeem gebruikers tellen ook altijd als InSite gebruiker als Windows toegang aan staat.. Account object: {\n \"KnUser\": {\n \"Element\": {\n \"@UsId\": \"93448. 1000000\",\n \"Fields\": {\n \"Pw\": \"GHJKL!!!23456gfdgf\",\n \"Upn\": [test.van.test@test.com](mailto:test.van.test@test.com),\n \"Acom\": \"false\",\n \"Nm\": \"test van test (1000000)\",\n \"OcUs\": \"false\",\n \"BcCo\": \"1000000\",\n \"PoMa\": \"false\",\n \"AcUs\": \"false\",\n \"Abac\": \"false\",\n \"Awin\": \"false\",\n \"EmAd\": [test.van.test@test.com](mailto:test.van.test@test.com),\n \"InSi\": \"true\",\n \"Site\": \"false\",\n \"MtCd\": \"1\",\n \"Acon\": \"false\"\n }\n }\n }\n}", "IsError": true } ], "Success": false, "AccountCorrelated": false }

T4ESamuel commented 5 months ago

Original audit log mesage was: "Failed to create account , message: Audit log with action: "CreateAccount" exceeded data size limit."

The exception was displayed in the $outputcontext using write-information ($outputContext | ConvertTo-Json -Depth 10) (thanks Rick J)