Hi @大坂 翔 ,
Per my test, you need to have site collection admin permission to get the roleassignments .
At the beginning, you are just site owner. Your global admin set you as site collection admin, then it worked.
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.