Get word document ID from JavaScript API

Budhitha Lakshan 5 Reputation points


I'm working on currently creating an MS Office 365 add-in project. So I need a generic way to get Word or PowerPoint Document ID to Add-in. Here need be access in an organizational account or Personal account as well.
I tried this API call but result give us URL but it's doesn't contained the proper document ID as well.

  • For Organizational account -><company name>/Documents/Document6tes.docx
  • For Personal account -><ID>/Document%205.docx
    ** Even <ID> also doesn't have any connection with Onedrive document id.

Can someone help me to get the Document ID using Javascript API?

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
903 questions
{count} vote