Make excel file readable/editable using Graph Api's

GoodUser 0 Reputation points
2023-12-09T04:55:28.27+00:00

I have a requirement where I have to make my excel file readable or editable from my java application .

I am following this approach https://learn.microsoft.com/en-us/graph/api/worksheetprotection-protect?view=graph-rest-1.0&tabs=http

message": "/me request is only valid with delegated authentication flow.",
    "error": {
        "code": "itemNotFound",
        "message": "The resource could not be found.",}

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

1 answer

Sort by: Most helpful
  1. Akash Jadav 85 Reputation points Microsoft External Staff
    2023-12-09T09:59:01.9366667+00:00

    Thanks for reaching out.

    The problem here is how you're authenticating. The "/me" endpoint refers to the user in whose context you are running request, thus is only available for delegate permission flows. The application permissions model (client credentials), you are running your code without any user context, so there is no user to "resolve" for the "/me" endpoint and hence you are using /users/{userID}.

    In postman, you have to get token by clicking on Application folder, Authorization -> Get New Access Token. then you will be able to make calls to /users/... endpoints.

    For more details refer documentation.

    Hope this will help.


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

    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.