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-22 02:46:29Z]: 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: 67bcc84c-fc2e-4fa8-8ccd-499f0e302100 Correlation ID: adc6c256-bf92-4bff-90fb-85461e8b09f4 Timestamp: 2026-07-22 02:46:29Z - Correlation ID: adc6c256-bf92-4bff-90fb-85461e8b09f4 - Trace ID: 67bcc84c-fc2e-4fa8-8ccd-499f0e302100
(node:5032) [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-22 02:46:29Z]: 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: 84e89693-52eb-4a82-9ad2-d54a3ed42d00 Correlation ID: d338c852-6a52-4c98-ae5d-8bcff9b13367 Timestamp: 2026-07-22 02:46:29Z - Correlation ID: d338c852-6a52-4c98-ae5d-8bcff9b13367 - Trace ID: 84e89693-52eb-4a82-9ad2-d54a3ed42d00
Error getting the secret: invalid_client: 7000222 - [2026-07-22 02:46:29Z]: 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: 3f5c2e10-96ff-4f54-b15e-74a9885b1f00 Correlation ID: a4ee5177-b2dc-46c6-84da-777706d80d21 Timestamp: 2026-07-22 02:46:29Z - Correlation ID: a4ee5177-b2dc-46c6-84da-777706d80d21 - Trace ID: 3f5c2e10-96ff-4f54-b15e-74a9885b1f00
Error getting the secret: invalid_client: 7000222 - [2026-07-22 02:46:29Z]: 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: 8b6522e6-d537-458d-a227-f1edfd7c2600 Correlation ID: e21b4c5e-0b72-4a5c-8b19-0a4c5d5a5230 Timestamp: 2026-07-22 02:46:29Z - Correlation ID: e21b4c5e-0b72-4a5c-8b19-0a4c5d5a5230 - Trace ID: 8b6522e6-d537-458d-a227-f1edfd7c2600
Error getting the secret: invalid_client: 7000222 - [2026-07-22 02:46:29Z]: 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: 3f5c2e10-96ff-4f54-b15e-74a98c5b1f00 Correlation ID: 170196c5-1e2f-4a49-881a-238569a3dd94 Timestamp: 2026-07-22 02:46:29Z - Correlation ID: 170196c5-1e2f-4a49-881a-238569a3dd94 - Trace ID: 3f5c2e10-96ff-4f54-b15e-74a98c5b1f00
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)