I have shared a folder/document to an external user (outside the organization) in SharePoint online doc library. An email to the new user is shared with One time passcode to access the file. Now, the requirement is to Un-Share the document only for that user programatically. PLease suggest me the right API and sample code piece to help me in this regard. Any help as CSOM, REST API is appreciated TIA!
PS: I am using .NET CSOM apis and I am not sharing anonymous links to external user