Hello @Jason Reed,
To connect a custom GPT to a specific folder in SharePoint, you need to make sure your Azure AD App is correctly set up to handle authentication and access permissions. First, ensure the app is registered in Azure AD and has the necessary Microsoft Graph API permissions, such as Sites.Selected
, to access SharePoint content.
The error you’re facing may be due to an invalid token, which often happens when it’s not issued by the correct app or isn’t properly configured. Double-check that the client ID, client secret, and tenant ID are correctly set and that your OAuth flow is working as expected. If you're using the On-Behalf-Of (OBO) flow, make sure the original user token is valid and includes the right scopes for SharePoint access.
Also, confirm that all required permissions have been granted and consented to by an administrator in your Azure AD tenant this step is often missed. Sometimes, even if permissions are set, they need to be explicitly granted consent for the application to function correctly.
For troubleshooting, you can use tools like Microsoft Graph Explorer to test API calls and verify if the issue lies with token generation or missing permissions.
Kindly refer below links:
Create a SharePoint connection
SharePoint Server Microsoft Graph connector
Use the Microsoft Graph API
Hope this helps. Do let us know if you any further queries.