Hello @NoNo
I think I figured it out. I was able to successfully connect my Microsoft account and have the GPT retrieve my Microsoft profile details without getting a “Missing Access Token” message.
I also want to thank @ruv for his support the other day. We spent a few hours troubleshooting, and although we didn’t resolve it together, he helped me stay on path. Hopefully, this resolves your issue.
For me, the problem was that I was using the wrong value for the Client Secret in the Oauth authentication. I was using the Client Secret “Secret ID” value from my app in Azure instead of the Client Secret “Value” string.
Additionally, I used the following URLs both in the Oauth and in the JSON;
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
https://login.microsoftonline.com/common/oauth2/v2.0/token
To verify that this was the fix for me, I reconfigured the GPT using the Azure app’s Client ID and the Client Secret “Secret ID”. I get the Missing Access Token message every time. When I switch it back to the Value string, it works again.
Keep in mind that each time you reenter or change these keys you must save and refresh to get the new callback URL to replace in your Azure app’s Redirect URI.
Also, not sure if this matters, I changed the Azure app’s “Supported account types” to “All Microsoft account users”. Previously, I had it set to “Personal Accounts Only”. If changing it does not work, just delete the app in Azure and create a new one with option for the most account types selected.
Also, also, I was able to complete this setup with Azure app’s created in both my personal Microsoft account’s Azure, and my business Microsoft’s account Azure, confirming that either or should work.
I used a very basic JSON for the test. Hopefully, it will continue to work as I need more scopes to it. This JSON was generated by ChatGPT.
{
"openapi": "3.1.0",
"info": {
"title": "A.D.A GPT Microsoft Graph Integration",
"version": "1.0.0",
"description": "This specification outlines the integration of A.D.A GPT with the Microsoft Graph API to access and read the user's profile."
},
"servers": [
{
"url": "https://graph.microsoft.com/v1.0",
"description": "Microsoft Graph API server"
}
],
"paths": {
"/me": {
"get": {
"operationId": "getUserProfile",
"summary": "Get User Profile",
"description": "Retrieve the user's profile information from Microsoft Graph.",
"responses": {
"200": {
"description": "Successful response with user profile data.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserProfile"
}
}
}
},
"401": {
"description": "Unauthorized request due to invalid or missing authentication token."
},
"403": {
"description": "Forbidden request due to insufficient permissions."
}
}
}
}
},
"components": {
"securitySchemes": {
"OAuth2": {
"type": "oauth2",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
"tokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
"scopes": {
"User.Read": "Read user profile"
}
}
}
}
},
"schemas": {
"UserProfile": {
"type": "object",
"properties": {
"displayName": {
"type": "string"
},
"mail": {
"type": "string"
},
}
}
}
},
"security": [
{
"OAuth2": ["User.Read"]
}
]
}
Hopefully this works for you like it did for me.