iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

Error getting the secret: invalid_client: 7000222 - [2026-07-10 01:45:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 07e7bbc2-ad47-450a-a0cc-d8a1fcc21f00 Correlation ID: ec28a0a9-880a-4fd8-9e8e-bfe0f18939da Timestamp: 2026-07-10 01:45:55Z - Correlation ID: ec28a0a9-880a-4fd8-9e8e-bfe0f18939da - Trace ID: 07e7bbc2-ad47-450a-a0cc-d8a1fcc21f00
(node:512) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error getting the secret: invalid_client: 7000222 - [2026-07-10 01:45:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: cf66a3ee-e326-4663-b40c-b80361dd2400 Correlation ID: 2e346f2e-cd29-4705-9881-c3243c8923cc Timestamp: 2026-07-10 01:45:55Z - Correlation ID: 2e346f2e-cd29-4705-9881-c3243c8923cc - Trace ID: cf66a3ee-e326-4663-b40c-b80361dd2400
Error getting the secret: invalid_client: 7000222 - [2026-07-10 01:45:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 8a8d3c51-cd3d-4d15-a532-2861572a9600 Correlation ID: 7f2c0a4d-bfed-491d-96a9-a09ef44c5ba3 Timestamp: 2026-07-10 01:45:55Z - Correlation ID: 7f2c0a4d-bfed-491d-96a9-a09ef44c5ba3 - Trace ID: 8a8d3c51-cd3d-4d15-a532-2861572a9600
Error getting the secret: invalid_client: 7000222 - [2026-07-10 01:45:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 8a8d3c51-cd3d-4d15-a532-28615a2a9600 Correlation ID: ce523b1f-96e2-4bcd-bac3-19c06bd27ef7 Timestamp: 2026-07-10 01:45:55Z - Correlation ID: ce523b1f-96e2-4bcd-bac3-19c06bd27ef7 - Trace ID: 8a8d3c51-cd3d-4d15-a532-28615a2a9600
Error getting the secret: invalid_client: 7000222 - [2026-07-10 01:45:56Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: b4cf08c1-ce18-415a-a0f6-b1efb4360a00 Correlation ID: 06d325b9-faee-4545-807b-46f2e3636a1a Timestamp: 2026-07-10 01:45:56Z - Correlation ID: 06d325b9-faee-4545-807b-46f2e3636a1a - Trace ID: b4cf08c1-ce18-415a-a0f6-b1efb4360a00
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:30:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)