Hi @Grzegorz Dubiel,
Per my research, in oneDrive for Business and SharePoint document libraries will not return the inheritedFrom property. It's an expected result. You could refer to the following document for more details
https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0
For permission, you could use followig api
https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions
Documentation: List permissions
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.