Got error "Token contains invalid signature" when accessing microsoft.graph.downloadUrl

Vo Van Hung (GAM.PDC) 20 Reputation points
2023-07-07T09:51:31.27+00:00

When I use endpoint /v1.0/drives/{driveId}/items/{item_Id}, I get @microsoft.graph.downloadUrl in response.

In my cooperation site, I can access the @microsoft.graph.downloadUrl above and get file successfully. However, when I try the same with other site, I get an error: "Sorry, something went wrong. Token contains invalid signature."

How can I solve this problem.
Thank you very much!

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. TH-4749-MSFT 3,315 Reputation points
    2023-07-07T15:53:00.3433333+00:00

    Hello Vo Van Hung (GAM.PDC),

    Thanks for reaching out. You can verify if the token and signature in the 'tempauth' section of the download URL contains a valid signature. You will find the signature at the end after the '.' period. You can also compare URLs used on both sites to see if they match.

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

    Thanks.


1 additional answer

Sort by: Most helpful
  1. Vo Van Hung (GAM.PDC) 20 Reputation points
    2023-07-10T08:48:03.2966667+00:00

    I checked 2 URLs of 2 sites, the format of invalid token is eyJ0....eyJh...kIb...c

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.