How to get user information in Office application code

I need help on how to log into the user’s system in the office code of the application. This is the Api JSOM office (JavaScript object model), which we use to obtain information from the MS Office product, for example, to read the contents of an MS Word document in which I use my application to save this content somewhere, for example, in a document library SharePoint as a word document file. Therefore, I need to know the current user information, such as logged id, etc., Therefore, I can determine who saved this document to SharePoint. Any pointers would be helpful.

+4
source share
1 answer

While there is currently no Office JS API to get the currently logged in user, you can always use ADAL.js to authenticate the user and then make CORS calls to SharePoint, as shown in this blog .

Also, feel free to request such an API on "Extending the user platform of the extension platform . "

Gabriel Royer - Developer Team Extensibility Team, MSFT

+3
source

Source: https://habr.com/ru/post/1617024/


All Articles