Hi everyone,
I’m working with the OpenAI Agent Builder and using an MCP server for OpenAi of SharePoint.Currently, my MCP server authenticates using an access token copied from Microsoft Graph Explorer. This works but the access token expires after 4–24 hours (depending on the tenant policy). Once the token expires, the agent starts returning “MCP protocol failed” errors, and I have to manually generate and paste a new token every day.
I wanted to ask the community:
-
Has anyone solved automatic authentication / token refresh for an MCP server using Microsoft Graph?
-
Is the recommended approach.
-
Use client credentials flow (client_id + client_secret)?
Thanks in advance!