Hi there,
I read almost all of the "Get user profile (V2)" questions, but couldn't find an answer to this one exactly.
I'm trying to read an email from Excel and checking if an email exists in O365.
What I want to achieve is if email from Excel exists -> send an email
If email from Excel not exists -> log "bad email entry" to Excel
It is easy as long as email exists, but when an email does not exists, this is error what I get and I cannot extrapolate bad request and log bad email back to excel into a column.
Please take a look at the screenshots below.
I'm checking if "Employee EMAIL" exists, if so -> put it in the "Correct Email" column, otherwise in the "Incorrect Email"
Bad request output
{"statusCode":404,"headers":{"Transfer-Encoding":"chunked","Vary":"Accept-Encoding","Strict-Transport-Security":"max-age=31536000","request-id":"fdc19193-f001-43e3-bb17-fa208e6efbae","client-request-id":"fdc19193-f001-43e3-bb17-fa208e6efbae","x-ms-ags-diagnostic":"{\"ServerInfo\":{\"DataCenter\":\"West Europe\",\"Slice\":\"E\",\"Ring\":\"5\",\"ScaleUnit\":\"002\",\"RoleInstance\":\"AM2PEPF00005DCA\"}}","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Date":"Mon, 12 Apr 2021 07:36:42 GMT","Content-Type":"application/json","Content-Length":"284"},"body":{"error":{"code":"ResourceNotFound","message":"User not found","innerError":{"date":"2021-04-12T07:36:43","request-id":"fdc19193-f001-43e3-bb17-fa208e6efbae","client-request-id":"fdc19193-f001-43e3-bb17-fa208e6efbae"}}}}

