Comments (9)
Hi Mirko,
Do you have some more details on your kind of Microsoft account? Is it a personal one or an account managed through Azure Directory?
https://support.microsoft.com/en-us/help/4462988/rest-api-is-not-yet-supported-for-this-mailbox-error has some more details on the problem.
I also adjusted the instructions a bit on https://github.com/thobach/MMM-MicrosoftToDo/blob/master/README.MD as Microsoft change the app registration workflow a bit.
To further trouble shoot the issue it may also be helpful to see if the following command returns an access token
:
curl -X POST \ https://login.microsoftonline.com/common/oauth2/v2.0/token \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'client_id=<client id>&scope=offline_access%20user.read%20tasks.read&refresh_token=<refresh token>&grant_type=refresh_token&client_secret=<client secret>'
And if that access token
can be used to get the tasks with the following command:
curl -X GET \ 'https://graph.microsoft.com/beta/me/outlook/taskFolders/<list id>/tasks?$select=subject,status&$top=10&$filter=status%20ne%20%27completed%27' \ -H 'Authorization: Bearer <access token>'
from mmm-microsofttodo.
from mmm-microsofttodo.
Tried your two calls:
- Yes I can get both access and refresh tokens
- No the access token still gives me the MailboxNotEnabledForRESTAPI error
Interestingly, if I use the Graph Explorer, I get a different access token. Using that one I can execute the REST call with the above URL...
from mmm-microsofttodo.
@mirko3000 In that case maybe your configuration of the Magic Mirror Web App in Azure is different from the Graph Explorer app. This is my configuration:
If you want, you can share your app manifest from https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/Manifest/appId//isMSAApp/true so I can run a diff against mine.
from mmm-microsofttodo.
I noticed a small different at the "Access tokens" checkbox, now I am getting this error:
{ code: 'MailboxNotHostedInExchangeOnline',
message:
'Mailbox is hosted by an on-premise or non-Exchange server, which is not supported.',
innerError:
{ 'request-id': '14ea8b84-9aa1-4400-88a9-a1424c67b94e',
date: '2020-05-02T09:13:19'
}
}
After quick research this seems to be a rather new error message. Yes I do not have an exchange account, only Outlook.com. But why it still works in the graph explorer?
from mmm-microsofttodo.
Here is my manifest (IDs changed to 1234567890):
{
"id": "1234567890",
"acceptMappedClaims": null,
"accessTokenAcceptedVersion": 2,
"addIns": [],
"allowPublicClient": false,
"appId": "1234567890",
"appRoles": [],
"oauth2AllowUrlPathMatching": false,
"createdDateTime": "2020-04-21T19:12:47Z",
"groupMembershipClaims": null,
"identifierUris": [],
"informationalUrls": {
"termsOfService": null,
"support": null,
"privacy": null,
"marketing": null
},
"keyCredentials": [],
"knownClientApplications": [],
"logoUrl": null,
"logoutUrl": null,
"name": "MagicMirror",
"oauth2AllowIdTokenImplicitFlow": false,
"oauth2AllowImplicitFlow": true,
"oauth2Permissions": [],
"oauth2RequirePostResponse": false,
"optionalClaims": null,
"orgRestrictions": [],
"parentalControlSettings": {
"countriesBlockedForMinors": [],
"legalAgeGroupRule": "Allow"
},
"passwordCredentials": [
{
"customKeyIdentifier": null,
"endDate": "2299-12-30T23:00:00Z",
"keyId": "1234567890",
"startDate": "2020-04-26T10:22:06.357Z",
"value": null,
"createdOn": "2020-04-26T10:22:07.8474705Z",
"hint": "=S4",
"displayName": "MagicMirror"
}
],
"preAuthorizedApplications": [],
"publisherDomain": null,
"replyUrlsWithType": [
{
"url": "https://localhost:1234",
"type": "Web"
}
],
"requiredResourceAccess": [
{
"resourceAppId": "1234567890",
"resourceAccess": [
{
"id": "1234567890",
"type": "Scope"
},
{
"id": "1234567890",
"type": "Scope"
},
{
"id": "1234567890",
"type": "Scope"
},
{
"id": "1234567890",
"type": "Scope"
},
{
"id": "1234567890",
"type": "Scope"
}
]
}
],
"samlMetadataUrl": null,
"signInUrl": null,
"signInAudience": "AzureADandPersonalMicrosoftAccount",
"tags": [],
"tokenEncryptionKeyId": null,
"verifiedPublisher": {
"displayName": null,
"verifiedPublisherId": null,
"addedDateTime": null
}
}
from mmm-microsofttodo.
The main differences I see are that for me I have:
"allowPublicClient": null,
- according to https://docs.microsoft.com/de-de/azure/active-directory/develop/reference-app-manifest the default value isfalse
though, so this should not make a differenceresourceAccess
for me lists only one item (e1fe6dd8-ba31-4d61-89e7-88639da4683d -> User.Read), not 5
Maybe this can help with the trouble shooting?
from mmm-microsofttodo.
I experimented with the resources, that is why I have 5. Other than that I have no clue what else to do....
Does it work for you with an Outlook.com account?
from mmm-microsofttodo.
Ok, so I finally got it working! My guess: German data protection laws do not allow REST APIs. I created a new account based in the US, now it works as described.
from mmm-microsofttodo.
Related Issues (20)
- Support to view My Day?
- Step support? HOT 1
- Black Screen HOT 2
- Error: Cannot find module 'node-fetch' HOT 4
- does it work on MagicMirror2? HOT 1
- Is there a way to not include overdue tasks?
- Bad Request Error HOT 15
- "Failed to load swrast driver" HOT 1
- Not linked to account. HOT 2
- Problems with instructions / authorization code generation (code) HOT 1
- Font Awesome icons not loading HOT 3
- User not a member of tenant HOT 3
- Login failure HOT 2
- Azure changes HOT 1
- In depth explanation of the step: Refresh Token Generation HOT 4
- Correct Credentials, appears to be missing a node module HOT 3
- replaceAll is not a function HOT 1
- Bad Request HOT 7
- Shopping list? HOT 2
- Does it support "Important" in ToDo? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmm-microsofttodo.