Hi @sharepoint test ,
You will need a delegated account with direct edit access to the files to list the permission of the item. If you are Delegated (work or school account) it will support Sites.ReadWrite.All permission. And if you are Delegated (personal Microsoft account). It's not supported to create Sites.ReadWrite.All permission.
Here is the document for reference
https://learn.microsoft.com/en-us/graph/api/driveitem-list-permissions?view=graph-rest-1.0&tabs=http
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.