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-12 16:10:10Z]: 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: 09b7ff35-bb54-40d8-9365-55a7f2f40300 Correlation ID: 3216c3a9-35d2-4fa6-aec3-b4ee7b5e3c1d Timestamp: 2026-07-12 16:10:10Z - Correlation ID: 3216c3a9-35d2-4fa6-aec3-b4ee7b5e3c1d - Trace ID: 09b7ff35-bb54-40d8-9365-55a7f2f40300
(node:5456) [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-12 16:10:10Z]: 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: e1f0fd45-7e19-48c5-80c4-bce0fd7b0a00 Correlation ID: 6cff399f-48c1-4eeb-b5e9-ba66403ca7b5 Timestamp: 2026-07-12 16:10:10Z - Correlation ID: 6cff399f-48c1-4eeb-b5e9-ba66403ca7b5 - Trace ID: e1f0fd45-7e19-48c5-80c4-bce0fd7b0a00
Error getting the secret: invalid_client: 7000222 - [2026-07-12 16:10:11Z]: 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: 09b7ff35-bb54-40d8-9365-55a703f50300 Correlation ID: bbefd104-7060-4484-a9f0-bf300bc12455 Timestamp: 2026-07-12 16:10:11Z - Correlation ID: bbefd104-7060-4484-a9f0-bf300bc12455 - Trace ID: 09b7ff35-bb54-40d8-9365-55a703f50300
Error getting the secret: invalid_client: 7000222 - [2026-07-12 16:10:11Z]: 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: 808085d2-4723-475c-8d70-26e859b20a00 Correlation ID: a982ccd1-389c-41ba-9703-f5625deb1231 Timestamp: 2026-07-12 16:10:11Z - Correlation ID: a982ccd1-389c-41ba-9703-f5625deb1231 - Trace ID: 808085d2-4723-475c-8d70-26e859b20a00
Error getting the secret: invalid_client: 7000222 - [2026-07-12 16:10:11Z]: 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: 06668e1c-133d-4260-a8d4-c00adacd0e00 Correlation ID: 23772c9b-45b5-4c52-a781-3e697934e76a Timestamp: 2026-07-12 16:10:11Z - Correlation ID: 23772c9b-45b5-4c52-a781-3e697934e76a - Trace ID: 06668e1c-133d-4260-a8d4-c00adacd0e00
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)