-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't set SkuID to add a license to a user #735
Comments
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") addLicenses := []graphmodels.AssignedLicenseable { |
I believe you only need to add the import for 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
The text was updated successfully, but these errors were encountered: