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-24 04:26:30Z]: 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: aa5d0769-c9fc-4473-939d-029a820e5e00 Correlation ID: 68b83cd2-11a0-4724-93f4-6a503f335159 Timestamp: 2026-07-24 04:26:30Z - Correlation ID: 68b83cd2-11a0-4724-93f4-6a503f335159 - Trace ID: aa5d0769-c9fc-4473-939d-029a820e5e00
(node:5660) [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-24 04:26:30Z]: 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: 6f99ba46-da20-4f3d-9e71-94ead9502600 Correlation ID: 2b2a1647-4fdf-4f9f-a533-c30b96d168a3 Timestamp: 2026-07-24 04:26:30Z - Correlation ID: 2b2a1647-4fdf-4f9f-a533-c30b96d168a3 - Trace ID: 6f99ba46-da20-4f3d-9e71-94ead9502600
Error getting the secret: invalid_client: 7000222 - [2026-07-24 04:26:31Z]: 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: 9d7cb76b-1f7c-4f61-b13a-5a3034940000 Correlation ID: 0509b470-2239-4e4a-adeb-cab8f150ac8f Timestamp: 2026-07-24 04:26:31Z - Correlation ID: 0509b470-2239-4e4a-adeb-cab8f150ac8f - Trace ID: 9d7cb76b-1f7c-4f61-b13a-5a3034940000
Error getting the secret: invalid_client: 7000222 - [2026-07-24 04:26:31Z]: 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: 9d7cb76b-1f7c-4f61-b13a-5a3038940000 Correlation ID: 1c034114-b877-442f-bae1-b8b4399aa47c Timestamp: 2026-07-24 04:26:31Z - Correlation ID: 1c034114-b877-442f-bae1-b8b4399aa47c - Trace ID: 9d7cb76b-1f7c-4f61-b13a-5a3038940000
Error getting the secret: invalid_client: 7000222 - [2026-07-24 04:26:31Z]: 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: 367dd992-0888-4abf-9c95-f09d6d535900 Correlation ID: d1011100-1d23-4757-8d5e-d67d1194d178 Timestamp: 2026-07-24 04:26:31Z - Correlation ID: d1011100-1d23-4757-8d5e-d67d1194d178 - Trace ID: 367dd992-0888-4abf-9c95-f09d6d535900
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)