There are two types of buttons you can create on your agreement object:
Client Credentials This button interacts with SharePoint as an administrator user.
Delegate This button prompts user to log in to Office 365 and run processes as the Active Directory user that was logged in. In most cases, the Salesforce user and Active Directory user should be the same.
The System Administrator must add the button to a page layout before users can access functionality.
To Add Office 365 Integration Buttons
In Salesforce, click Setup from the Setup icon in the upper right
Click Object Manager
Click on your agreement object. For example, Contract Agreement.
Navigate to Buttons, Links and Actions and click New Button or Link
Enter a name for the button in the Label field. We recommend Document Collaborations.
For Behavior, select Display in existing window without sidebar or header
Enter the button URL. For examples, here is the code for creating the buttons on the Contract Agreement object: