Sep 30 2021 01:00 AM
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 found this article https://www.sharepointdiary.com/2019/04/sharepoint-online-check-if-external-user-accepted-invitation... stating that you can use PnP PowerShell to obtain this information from the Access Requests list within the site collection.
It states the status codes are:
Status code | Status description |
0 | The access request or invitation is pending. |
1 | The access request has been approved. |
2 | The invitation has been accepted. |
3 | The access request has been denied. |
4 | The invitation has expired. |
5 | The invitation has been revoked. |
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?
Thanks for all help provided.
Joost