Hi @Irek Singer,
Thank you for posting in this community.
To convert a SharePoint Permission Mask to the name of the permission, you can use the following steps:
Convert the hexadecimal permission mask to binary. For example, 0x00000005 in binary is 00000101.
Starting from the rightmost bit, match each bit to the corresponding permission level in the following table:
BitPermission Level0EmptyMask1ViewListItems2AddListItems3EditListItemsFor each bit that is set to 1, add the corresponding permission level to a list of permissions.
Return the list of permissions.
For example, for the permission mask 0x00000005, the binary representation is 00000101. The bits that are set to 1 correspond to the ViewListItems and EditListItems permission levels, so the name of the permission is "ViewListItems, EditListItems".
Reference:
Implementing Custom Security Rights in SharePoint
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.