OneDrive SDK & background task WP8.1

221 views Asked by At

I'm trying to use the OneDrive SDK in a background task (Windows Runtime Component) but I get an error when I try to authenticate:

var result = await Authenticator.AuthenticateUserAsync(new[] { serviceTicketRequest }, CredentialPromptType.PromptIfNeeded)

Error I get: The request is not supported. (Exception from HRESULT: 0x80070032)

I have posted this query on the MSDN forum here.

2

There are 2 answers

1
Nolan On

Are you using Xamarin by any chance? In that case the crasch is the result of a bug when trying to debug a 64 bit process.

0
Yohann On

The problem is that I had to record the access token and use it afterwards for next calls. But it is granted only for 1 hour.