As per the documentation, a non persistent sessions expires after about 7 minutes of inactivity. I am however experiencing the following error with only milliseconds between creating a session and using Patch to update a range in a Excel workbook:
status Code: BadRequest
Microsoft.Graph.ServiceException: Code: InvalidSession
Message: The target session is invalid.
Inner error:
Code: invalidSessionReCreatable
Message: The session specified in the request does not exist or is invalid due to a transient error.
Inner error:
Code: InvalidOrTimedOutSession
Message: We noticed that you haven't been interacting with this workbook, so we paused your session.
The last message ("We noticed that you haven't been interacting with this workbook, so we paused your session.") seems like a hint towards the issue, but I think the error might be misleading. Is anyone else experiencing this issue?
More details could be found in this Stack Overflow issue.