SharePoint Online invitation status incorrect?

%3CLINGO-SUB%20id%3D%22lingo-sub-2798207%22%20slang%3D%22en-US%22%3ESharePoint%20Online%20invitation%20status%20incorrect%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2798207%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20a%20SharePoint%20Online%20site%20collection%20in-place%2C%20which%20we%20share%20with%20external%20service%20providers.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20user%20who%20manages%20this%20site%20collection%20has%20requested%20me%20to%20generate%20a%20report%20that%20contains%20information%20about%20the%20invitation%20status%2C%20and%20deliver%20it%20periodically.%20By%20this%20I%20mean%2C%20has%20the%20invitation%20been%20accepted%20by%20the%20external%20user%3F%20Is%20the%20invitation%20still%20pending%3F%20Has%20the%20invitation%20expired%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20this%20article%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.sharepointdiary.com%2F2019%2F04%2Fsharepoint-online-check-if-external-user-accepted-invitation.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.sharepointdiary.com%2F2019%2F04%2Fsharepoint-online-check-if-external-user-accepted-invitation.html%3C%2FA%3E%26nbsp%3Bstating%20that%20you%20can%20use%20PnP%20PowerShell%20to%20obtain%20this%20information%20from%20the%20Access%20Requests%20list%20within%20the%20site%20collection.%3C%2FP%3E%3CP%3EIt%20states%20the%20status%20codes%20are%3A%3C%2FP%3E%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E%3CSTRONG%3EStatus%20code%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E%3CSTRONG%3EStatus%20description%3C%2FSTRONG%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E0%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3EThe%20access%20request%20or%20invitation%20is%20pending.%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E1%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3EThe%20access%20request%20has%20been%20approved.%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E2%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3EThe%20invitation%20has%20been%20accepted.%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E3%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3EThe%20access%20request%20has%20been%20denied.%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E4%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3EThe%20invitation%20has%20expired.%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E5%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3EThe%20invitation%20has%20been%20revoked.%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20ran%20the%20script.%26nbsp%3BHowever%2C%20when%20I%20look%20at%20the%20outputs%20of%20the%20script%2C%20I%20see%20several%20invitations%20that%20come%20back%20with%20status%20code%200%20even%20though%20the%20invitation%20has%20expired%201%20year%20ago.%20So%2C%20I%20would%20expect%20this%20status%20code%20value%20to%20be%204.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20me%20the%20status%20code%20seems%20to%20be%20incorrect%2C%20or%20am%20I%20interpreting%20this%20all%20wrong%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20all%20help%20provided.%3C%2FP%3E%3CP%3EJoost%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2798207%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

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 codeStatus description
0The access request or invitation is pending.
1The access request has been approved.
2The invitation has been accepted.
3The access request has been denied.
4The invitation has expired.
5The 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

0 Replies