We have a SharePoint Online site collection in-place, which we share with external service providers.
The user who manages this site collection has requested me to generate a report that contains information about the invitation status, and deliver it periodically. By this I mean, has the invitation been accepted by the external user? Is the invitation still pending? Has the invitation expired?
I ran the script. However, when I look at the outputs of the script, I see several invitations that come back with status code 0 even though the invitation has expired 1 year ago. So, I would expect this status code value to be 4.
To me the status code seems to be incorrect, or am I interpreting this all wrong?