user5501201
user5501201

Reputation: 245

How to get logged in user info in Office app code

I need help in How to get logged in user in office app code. It's a office JSOM (JavaScript Object Model) Api that we use to get information from MS Office product like to read content of MS Word document in which I am using my app to save this content into somewhere for example in SharePoint Document Library as a word document file. So I need to know the current user's information like logged in id etc so I can identify who saved this document into SharePoint. Any pointers will be helpful.

Upvotes: 4

Views: 1403

Answers (1)

Gab Royer
Gab Royer

Reputation: 9836

While there is currently no Office JS API to get the current logged-in user, you could 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 the Office Extensibility Platform's UserVoice.

Gabriel Royer - Developer on the Office Extensibility Team, MSFT

Upvotes: 3

Related Questions