https://linen.dev logo
OUTLOOK_GET_MAILBOX_SETTINGS returns 403
# 🖥│support-forum
s
Hey! I am using a Composio Outlook MCP and I keep getting a 403 error (visible in the screenshot) when calling the
OUTLOOK_GET_MAILBOX_SETTINGS
tool. The rest of the tools (like listing messages or creating calendar events) work correctly meaning the connection is well established. Can you help me troubleshoot? Many thanks in advance https://cdn.discordapp.com/attachments/1402654737815310347/1402654737995796490/image.png?ex=6894b385&is=68936205&hm=24efb5e8dd01601492a9e7708d917ecf26946081aa245c76d774985df7c3aca2&
c
Hi Sebas, Could you share your MCP server Url along with your connected account Id?
s
c
We couldn't reproduce the Issue on our end. However, it seems like an authorization Issue. Could you share the reproducible steps on how you created the connection and MCP Url?
s
I am using Composio through Agno. I created the MCP server (and consequently the URL) through the [dashboard](https://mcp.composio.dev/dashboard/servers) To create the connected account, the logic is:
Copy code
auth_config = auth_configs_response.items[0]
            auth_config_details: AuthConfigDetail | None = app_toolkit.auth_config_details[0] if app_toolkit.auth_config_details else None
            if auth_config_details and auth_config_details.mode in ["BASIC", "API_KEY"]:
                return await self._handle_basic_or_api_key_auth(app_name, user_id, connection_config_params, auth_config_details, auth_config.id)

            connected_account_response: ConnectedAccountCreateResponse = await self._client.connected_accounts.create(
                auth_config=AuthConfig(id=auth_config.id),
                connection=Connection(user_id=user_id),
            )

            return self._handle_connection_response(connected_account_response, app_name)
c
When creating the MCP server, were you prompted to connect an account? Also, just to confirm, are you able to execute other tools?
s
No, I've had the experience of connecting an account on server creation when creating one for Notion, not for Outlook. I am building a multi-user system so it is actually good to not have any account directly connected to the MCP Server by default Yes, other tools are working like listing calendars, setting up events, reading emails, etc.
c
Thanks for the information, we are checking this. I'll let you know if I need any information.
Also, could you share the logIds of the working Tool calls from this MCP server?
s
Of course, here are 2 examples: -
log_GrGCXU-RHvhG
-
log_IF-CO-5IGaNM
c
The action requires
MailboxSettings.ReadWrite
, Could you check if you've configured it on your Auth Config?
s
That is surely it, I do not have it I'll admit I did not spend too long in the scopes configuration for it because the UI made it seem like these were all that existed. Is there somewhere that tells you all the possible scopes for a given Auth Config? https://cdn.discordapp.com/attachments/1402654737815310347/1402932293240360960/image.png?ex=6895b603&is=68946483&hm=4e9a0ba595205d1bfa796690fff1b9834a2d2fdc9df1d5cb36b6ee4366bfc4b1&
c
I understand, you can get the required scopes for any Tool using this endpoint:
Copy code
curl --location 'https://backend.composio.dev/api/v3/tools/get_scopes_required' \
--header 'x-api-key: <composio_api_key>' \
--header 'Content-Type: application/json' \
--data '{
    "tools": [
        "<Tool-Slug>"
    ]
}'
s
Thank you!!!
c
Yes, you need to enter the Tool Slug instead of Toolkit. For example
OUTLOOK_GET_MAILBOX_SETTINGS
.
s
Sorry man, early here still, read it as
toolkit
Will the connected users need to remove the connection and restart the OAuth process?
c
Yes, you need to refresh or reinitiate the connection. You can update the scope in your Auth Config and either create a new connection or refresh the existing connection. I would suggest you to refresh existing connection by using this [endpoint](https://docs.composio.dev/api-reference/connected-accounts/post-connected-accounts-by-nanoid-refresh) and completing the Auth flow.
s
Awesome, thank you!