Hi @Daniel Sousa | Flexmeester ,
As per documentation driveitem-createlink, it is currently supported for OneDrive Personal only.
Clip from the documentation:
When you attempt createLink for OneDrive for Business or SharePoint Online, it will return this error message "notSupported".
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".