CompactToken parsing failed with error

asked 2022-07-28T20:33:36.9+00:00
Udai Goyal 1 Reputation point

Hi Support,
I am trying to get the list of the documents from the "https://graph.microsoft.com/v1.0/me/drive/root/delta" api in the swift, but i am getting the error of "CompactToken parsing failed with error code: 80049217", please help us to get rid of this issue, and i'll be very thankful to you if you give us some sample code of swift to get the list of all files of one drive account.

Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
298 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2022-07-29T12:20:33.483+00:00
    ShivaniRai-MSFT 2,676 Reputation points

    Hi @Udai Goyal ,

    I am able to replicate this issue at my end and resolved this error by following this documentation. This error happens when the token used is invalid, (“Bearer”+space+token )this is the correct way to pass like a parameter the token.
    I am attaching screenshot from Postman for your reference:

    • Without space between Bearer and token:

    226183-image.png

    • After giving space between Bearer and token:

    226049-image.png

    Similar Post: https://github.com/OneDrive/onedrive-api-docs/issues/785

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    No comments