Microsoft onedrive Create onedrive folder programatically

I am looking for a code that lets you create a folder in one drive and give access to a user( Also, send the user the shared link as an email Tried researching online and found some article about graph API but didn't get enough information