Forum Discussion
Issue with OneDrive, SharePoint, and Microsoft Graph Connectors in Custom Declarative Agent
1. Quick checklist
Verify these base items first:
Account Permissions
Make sure the account used has:
SharePoint administrator permissions
Global read permissions (at least)
Service Status
Check Microsoft 365 service health status
Connector Quota
Verify that the tenant has not exceeded the maximum number of connectors
2. Step-by-step solution
Step 1: Reauthorize the connection
Open the Microsoft 365 Administrator Center
Navigate to “Settings” > “Search & Intelligence” > “Graph Connectors”
Locate the problem connector → Click “Reauthorize”
Step 2: Update Custom Statement Mapping
Access Azure AD Application Registration
Select the corresponding Graph Connector application
Check that the Declaration Mapping matches the SharePoint fields
Step 3: Clear cached data
In the SharePoint Administrator Center:
Go to Settings > Advanced > Reset Indexes
Wait 24 hours for the system to rebuild the index
3. Advanced Troubleshooting
Check the logs (requires administrator privileges):
Use PowerShell to get the error details:
powershell
Get-SPOTenantServicePrincipal -ScopeType All | Where-Object { $_.DisplayName -like “*Graph*” } | Format-List *
Filtering “Application” related events in Azure AD audit logs
4 Preventive measures
Best Practice:
Use separate development tenant for testing phase
Wait 48 hours after each modification of the declaration mapping to revalidate.
Create a dedicated service account for the connector (not a personal account)