Closed Trevor-J-Ortiz closed 1 day ago
Thanks for raising this @Trevor-J-Ortiz
Any chance you can confirm if the GO sample at the link below is helpful? https://learn.microsoft.com/en-us/graph/api/user-assignlicense?view=graph-rest-1.0&tabs=go
@andrueastman I did review this and that's where I ran into the issue. It shows the following code that leverages uuid.UUID which is an internal package. This is preventing me from using uuid.MustParse(), even if I got around the uuid by copying the uuid package code, .SetSkuId requires a *uuid.UUID parameter (as I screenshotted above). Below is a copy of the code I'm having issue with from the learn docs.
skuId := uuid.MustParse("45715bb8-13f9-4bf6-927f-ef96c102d394") assignedLicense.SetSkuId(&skuId)
addLicenses := []graphmodels.AssignedLicenseable { assignedLicense, }
@Trevor-J-Ortiz
I believe you only need to add the import for "github.com/google/uuid"
as the generated code relies on the package for the type.
Any chance you can confirm this works out for you?
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
On the assign license doc, it requires setting the SkuID using the uuid package. UUID is internal so it can't be imported. Is there another way to set the SkuID or am I doing this incorrectly?
https://github.com/microsoftgraph/msgraph-sdk-go/blob/v1.45.0/models/assigned_license.go https://learn.microsoft.com/en-us/graph/api/user-assignlicense?view=graph-rest-1.0&tabs=go![image](https://github.com/microsoftgraph/msgraph-sdk-go/assets/53014173/e705ca3b-ab76-4f2f-8d4c-384616cee58c)