0
votes

Is there a way to get the user who is signed into Word or Excel (not Outlook) from an Office add-in using JavaScript API for Office?

The documentation does not show anything except in Outlook. We have checked Office.js ducomentation and we still hope there is a hidden or pre-release way.

We need to check who has opened a Word document or Excel workbook with the add-in running in it, so we can set it up accordingly.

1
Can I ask why you want to check who opened the document with the add-in running? Depending on your reason, there might be a solution that doesn't need to retrieve the actual username itselfMichael Saunders
We relate some data the user can insert from our add-in into the document to who she is. The user opens a file based on the access rights she has on OneDrive for business (SPO) and we try to use that as an identification of who uses our add-in.Miro J.

1 Answers

1
votes

unfortunately this is not possible today for add-ins generally, and you specifically mentioned that you weren't asking about Outlook. (E.g. https://dev.office.com/code-samples-detail/5788). We're well aware of the scenario, though.

Thanks, -Tim