SharePoint / Teams Entra Application for netDocShare Sync Prerequisites
SharePoint/Teams Entra Application for netDocShare
Sync Prerequisites
Create the certificate
·
Generate a self-signed
certificate using the PowerShell command below:
$cert =
New-PnPAzureCertificate -CommonName "<certificate name>"
-OutPfx .\<certificate file name>.pfx -OutCert .\<certificate file
name>.cer -ValidYears 2 -CertificatePassword (Read-Host -AsSecureString
-Prompt "Enter Certificate Password")
- Enter Certificate Password”
should be replaced with a password.
- Write down this password for
future reference as Certificate Password.
- After executing the command, find
the .cer and .pfx files from the respective path for future usage.
Note: Please
ensure that PowerShell version 7.4.4 is installed and run Install-Module PnP.PowerShell
-Scope CurrentUse
Create Entra Application
- Login to the Azure portal and select
App Registrations.
- · Select New registration from
the App registrations page.
- · Fill the following highlighted
field values and click Register in the Register an application page.
- · Go to the Application Overview
page after completed the application registered.
- Write down the Tenant ID and Entra App ID from this page.
- Directory (tenant) ID as Tenant ID
- Application (Client) ID as Entra App ID
Generate Authentication
- · Click the Authentication
menu from the left-side menu.
- Click Add a Platform.

·
- Click Web and then Configure
Web.
- Enter https://sync.netdocshare.com/assets/spauth/index.html
in the Redirect URIs input.
- Check the boxes for Access
tokens (used for implicit flows) and
- ID tokens (used for implicit and
hybrid flows).
- Click Configure to save the configuration
·
- Verify that the Redirect URI
was properly added from the Authentication pane.
Add Certificate & Client Secret
- Click Certificates tab
to navigate the CCertificates list
- Click Upload certificate.
- Add the certificate that was
previously created (the .cer file) and enter a description.
- Click Add button to complete the upload.
- · After completing the
certificate upload write down the Thumbprint as Certificate Thumbprint.
Create Client Secret
- Click the Client Secrets
tab
- Click New client secret
- Enter the description and
choose an expiry date for the client secret in the popup.
- Click Add button.
·
- After creating the secret write
down the secret value as Application Secret and Secret ID.
API Permissions (SharePoint Only)
·
- Click API Permissions
menu from the left menu,
- Click Add a permission
and add the following permissions
- Microsoft Graph
- Site.FullControl.All (Delegated)
- User.Read (Delegated)
- SharePoint
- AllSites.FullControl (Delegated)
- Sites.FullControl.All (Application)
- Sites.Manage.All (Application)
- Sites.Selected (Application)
- · Click Grant admin consent
for {tenantName}
To use the SharePoint/Teams/OneDrive within
the same application, please add the below:
- Channel.Create
- ChannelMember.Read.All
- ChannelMember.ReadWrite.All
- Contacts.Read
- Contacts.ReadWrite
- Directory.Read.All
- Directory.ReadWrite.All
- Files.ReadWrite.All
- Group.ReadWrite.All
- Sites.FullControl.All
- Sites.Manage.All
- Sites.ReadWrite.All
- Sites.Selected
- Team.Create
- TeamMember.ReadWrite.All
- User.Read (Delegate)
- User.ReadWrite.All
Note:
- The netDocShare Sync web and
desktop applications use Delegated permission
- The netDocShare Sync Scheduler application use
Application permission.
Adding the SharePoint Connection on netDocShare Sync
- Add a new SharePoint connection
- Fill in every required field
with the values from previous steps
Adding the Teams Connection on netDocShare Sync
- Add a new Team connection
- Fill in every required field with the values
from previous steps
Grant granular access to SharePoint sites (optional)
Prerequisites:
1. Install
Postman to make http
requests
Set the
permissions for the desired site
- Open the Postman application
- Create a new request and open the Authorization tab
Set the Type to OAuth2.0
Under Configure New Token > Configuration
Options, set the following fields:
Grant Type
to “Client Credentials”
Client ID
to your Application (client) ID
Client Secret
to the value of a secret for your App
Client the Get New Access Token button
and click Proceed, then click Use Token in the
top-right
Next, we will configure the request
- Change the type in the top-left to POST, from GET
- Enter the URL: https://graph.microsoft.com/v1.0/sites/{Site ID}/permissions as the endpoint. Make sure to change {Site ID} to the Site ID that we copied earlier
- Click on the Body tab, select raw, then change the type from Text to JSON
- Add the following JSON body, and make sure to fill in the {client_id} and {app_name} from the Entra Application that was created earlier
{
"roles": [
"fullcontrol"
],
"grantedToIdentities": [
{
"application": {
"id": "{client_id}",
"displayName": "{app_name}"
}
}
]
}
- Then click Send and you should receive a 201 Created success.
Remove Sites.FullControl.All
access
Back
on the Azure Application, go to API Permissions and remove both
permission and consent for Sites.FullControl.All, for both SharePoint
and Microsoft Graph by clicking on the three dots next to the permission
Check that
it works
- On Postman, create a new request
- Keep it as GET and leave the body empty
- Reuse the same Authorization setup from the previous section
- In the endpoint, enter: https://graph.microsoft.com/v1.0/sites/{Site ID}, replacing {Site ID} with the Site ID we copied earlier
- Press Send
If you get a 200 OK response, the access is now set up properly
Related Articles
netDocShare v4.2.0.1612
New Features netDocShare Sync Sync deleted files and folders. Sync checkout status Sync selected files and folders in Bidirectional sync. Default meta data column creation for Document type when doc links Export jobs – Export the sync jobs filter by ...
netDocShare v3.7.0.0512
netDocShare SharePoint and Teams Applications Search Enhancement: Added Advanced Search with refinements. Filter: Date Range Selection for Date Column Filter. Filter: Filter Look Up Columns using Name Previously Supported Filter by Key. Document ...
netDocShare v4.2.1.20801
netDocShare Sync Sync Control: Being able to stop or restart a sync job. Custom Display Locations: Change the display location for NetDocuments and Teams or SharePoint in column mapping. Doc Links: Removed the appended NetDocuments ID from the synced ...
netDocShare v4.0.0.2002
New Features netDocShare Ability to perform an advanced search in Go to client matter view. netDocShare Hybrid Search Ability to narrow down the list of search results to the folder level with the config builder settings. Ability to view NetDocuments ...
netDocShare OneDrive Client ID and Secret Id Generation
OneDrive Client ID and Secret Id Generation Step 1: Please open the azure portal in browser https://portal.azure.com/#home Step 2: Please click the “Azure Active Directory Step 3: Once Azure Active Directory open after click the “App Registrations” ...