If you have that excel document in sharepoint document library you should give the siteid,driveid and then itemid in you code, something like this.
graphClient.Sites["siteid"]
.Drives["documentlibraryid"]
.Items["itemId"]
.CreateLink("edit", "anonymous", null, null, null)
.Request()
.PostAsync();
This way I was able to edit the excel file without logging as anonymous. I had also tested it in POSTMAN which also worked perfectly.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…