undefined: graphdrives.NewInvitePostRequestBody (Graph SDK Golang)

Sidi_244 0 Reputation points
2024-11-19T07:20:46.7566667+00:00

Hi There

I am trying to invite people to SharePoint Folders by using the example here (Golang): https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0&tabs=go

However, NewInvitePostRequestBody seems to be inexisting. I also tried using the beta version: https://github.com/microsoftgraph/microsoft-graph-docs-contrib/blob/9211cc774a5747465e974f796f5a7ad3e0ecab0d/api-reference/beta/includes/snippets/go/send-sharing-invite-go-snippets.md?plain=1#L19

But it does not compile because of undefined: graphdrives.NewInvitePostRequestBody. Is anyone having the same issue and knows where the problem lies?

Thanks!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,343 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,876 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 6,885 Reputation points Microsoft Vendor
    2024-11-19T08:05:37.64+00:00

    Hello Sidi_244,

    Thank you for reaching out to Microsoft Support!

    When you use the Graph SDK, this error appears to indicate that you have not installed the Graph Go SDK, please install it according to the documentation.

    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.

    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.