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-13 20:56:06Z]: 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: c9988535-6bfe-4a42-85ed-c212a1e10100 Correlation ID: cd81843c-428c-4722-b5a4-ac214b6a6ce2 Timestamp: 2026-07-13 20:56:06Z - Correlation ID: cd81843c-428c-4722-b5a4-ac214b6a6ce2 - Trace ID: c9988535-6bfe-4a42-85ed-c212a1e10100
(node:4648) [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-13 20:56:06Z]: 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: 09d1b943-8b9e-41ea-ba9e-8dc859290200 Correlation ID: 09454adc-6893-4053-9a1b-f2b9ea53f6db Timestamp: 2026-07-13 20:56:06Z - Correlation ID: 09454adc-6893-4053-9a1b-f2b9ea53f6db - Trace ID: 09d1b943-8b9e-41ea-ba9e-8dc859290200
Error getting the secret: invalid_client: 7000222 - [2026-07-13 20:56:06Z]: 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: 09d1b943-8b9e-41ea-ba9e-8dc868290200 Correlation ID: a5554aab-56ba-452d-bd72-bc82676a89d7 Timestamp: 2026-07-13 20:56:06Z - Correlation ID: a5554aab-56ba-452d-bd72-bc82676a89d7 - Trace ID: 09d1b943-8b9e-41ea-ba9e-8dc868290200
Error getting the secret: invalid_client: 7000222 - [2026-07-13 20:56:07Z]: 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: 4e834d6f-18f4-42b9-aeeb-d5864a262500 Correlation ID: 7539f486-b797-452e-bafd-f2ec650c5dd3 Timestamp: 2026-07-13 20:56:07Z - Correlation ID: 7539f486-b797-452e-bafd-f2ec650c5dd3 - Trace ID: 4e834d6f-18f4-42b9-aeeb-d5864a262500
Error getting the secret: invalid_client: 7000222 - [2026-07-13 20:56:07Z]: 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: 2db2da9a-c3d1-4386-91ed-8d64bfc52f00 Correlation ID: 7c0a7c93-2b61-4efb-a67a-34e076c38ee0 Timestamp: 2026-07-13 20:56:07Z - Correlation ID: 7c0a7c93-2b61-4efb-a67a-34e076c38ee0 - Trace ID: 2db2da9a-c3d1-4386-91ed-8d64bfc52f00
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)