Hello !
Thank you for posting on Microsoft Learn Q&A.
The delay happens because the indexer keeps retrying the SharePoint auth step and the portal UI isn't real time. By the time the failure finally surfaces in the blade, the device code may have expired.
https://free.blessedness.top/en-us/azure/search/search-monitor-indexers
You can always pull the current device login code from the indexer status API it’s embedded in the errorMessage of the latest run.
https://free.blessedness.top/en-us/azure/search/search-how-to-index-sharepoint-online
You can go for REST which works for portal created indexers too :
GET https://<your-service>.search.windows.net/indexers/<your-indexer-name>/status?api-version=2025-08-01-preview
api-key: <admin key>
Look in the JSON at lastResult.errors[*].errorMessage, it contains the device login URL and the device code to enter.
https://free.blessedness.top/en-us/azure/search/search-how-to-index-sharepoint-online
If you want to check in the portal, go to the search service, then go to your indexers and under the status open the latest run and check the error details (they include the device code). https://free.blessedness.top/en-us/azure/search/search-monitor-indexers