OneDrive / onedrive-texteditor-js

Simple single-page JavaScript app for editing text files
Other
29 stars 23 forks source link

aadsts70001 application is not supported for this api version #2

Open JuanPuebla opened 8 years ago

JuanPuebla commented 8 years ago

No matter what I do. I set all permissions in azure applications configuration, but I always get this error once the user is authenticated to open a file. I also changed manifest to set oauth2AllowImplicitFlow to true. I also set redirect url http://localhost:2009/ in azure config as is the url i get in visual studio

rgregg commented 8 years ago

Oh shoot. I need to update the documentation to talk about how to register an app for the v7 picker. Instead of using the traditional Azure Applications configuration, you need to visit the new apps portal: https://apps.dev.microsoft.com, and register an app there.

sshilpashetty commented 8 years ago

Hi rgregg ,

Even though i register app for" MSOnedrive for Buisness " in "https://apps.dev.microsoft.com," and set redirect url http://localhost I am getting the below error

"error=unauthorized_client&error_description=AADSTS70001%3a+Application+%273faa8476-1bfe-43ae-8c9a-d83cd33480d6%27+is+not+supported+for+this+API+version.%0D%0ATrace+ID%3a+2eb4b948-c1cd-4390-b33f-8ec3c1547556%0D%0ACorrelation+ID%3a+a1a290a0-60cb-40d6-aef1-2a8072460ad8%0D%0ATimestamp%3a+2016-06-06+13%3a03%3a44Z "

Could you please let me know whats the solution for this

JuanPuebla commented 8 years ago

I have the same problem with office365 acconts. The file picker only works for normal outlook.com account. When using office365 accounts we also get the following error:

Failed to load resource: the server responded with a status of 401 (Unauthorized) [OneDriveSDK Error] missing windowState from picker response

daboxu commented 8 years ago

hi @JuanPuebla , would you mind share the 401 HTTP Request and Response?

JuanPuebla commented 8 years ago

This is the request that returns a 401 after login in with office365 account:

Request URL:https://graph.microsoft.com/v1.0/me?%24select=mySite Request Method:GET Status Code:401 Unauthorized Remote Address:XX.XXX.88.152:443

Request headers Accept:application/json Accept-Encoding:gzip, deflate, sdch, br Accept-Language:en,ca;q=0.8,es;q=0.6 Authorization:bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ [....] Connection:keep-alive Host:graph.microsoft.com Origin:https://testdev2.virtusclass.com Referer:https://testdev2.virtusclass.com/Academic/Performance/Homework/Response/151 User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Response json { "error": { "code": "-2147024891, System.UnauthorizedAccessException", "message": "Access denied. You do not have permission to perform this action or access this resource.", "innerError": { "request-id": "41d311a5-cff8-4cda-90cf-972c92e8100e", "date": "2016-06-13T17:23:42" } } }

I don't know if this is enough...

Thanks

JuanPuebla commented 8 years ago

Hi,

Any news on this?

Thanks

Juan

dbayonacode commented 8 years ago

I am wondering if it is possible to use the file picker without triggering the authentication dialog. I would like to sign in in code and as a transparent process to the user. Does anybody know a way to do it? I need to use the file picker for OneDrive for business.

RamenJunkie commented 2 years ago

After registering an application is there something that needs done to connect the application to the code? In the past I've done some things with say, the Twitter API, and it needed Consumer Keys and such. There doesn't seem to be any thing I've seen mentioning adding any sort of keys or connections to the local files.