0

We are working on a PowerPoint web add-in. Is there any way to get the logged user's Username from web add-in? we have searched a lot but didn't get a solution yet. Any help would be appreciable. Thanks in advance.

Ranish
  • 877
  • 2
  • 10
  • 30
  • Does this answer your question? [How to get username, email address, filename from task pane app](https://stackoverflow.com/questions/36261336/how-to-get-username-email-address-filename-from-task-pane-app) – Eugene Astafiev Jun 09 '20 at 12:08
  • Thank you for your reply. we are not using any Single sign-on (SSO) mechanism in our system. – Ranish Jun 09 '20 at 12:14

1 Answers1

1

As far as I know, there is no way to get the user name from Word/Excel/PowerPoint. Your options are:

  1. Single sign-on (SSO). Your add-in gets a token from the Office host application that contains a "preferred_username" property. The value of the property is the email of the user logged into Office.

  2. Active Directory Authentication Library (ADAL) to get the user's identity.

Take a look at the How to get username, email address, filename from task pane app page for more information.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • We are not using any SSO mechanism in our existing system. We will try with the second option (ADAL) and get back to you. Thank you – Ranish Jun 10 '20 at 08:09