Closed buechele closed 4 weeks ago
Hi @buechele could you share a snippet of the code you are executing
Hi @rkodev this is the code I used on a tanent with around 100 teams:
graphClient, _ := graph.NewGraphServiceClientWithCredentials(
cred, []string{"https://graph.microsoft.com/.default"})
teams := getTeamIds(graphClient, nil)
for _, team := range teams {
isArchived := team.GetIsArchived()
if isArchived == nil {
fmt.Println("is nil")
}
}
It gives nil
in each case. The same behavior applies for GetCreatedDateTime()
.
kindly share the sdk call you make in the function getTeamIds(graphClient, nil)
@rkodev Ups... sorry!!! Now with no internal calls:
graphClient, _ := graph.NewGraphServiceClientWithCredentials(
cred, []string{"https://graph.microsoft.com/.default"})
response, _ := graphClient.Teams().Get(context.Background(), nil)
teams := response.GetValue()
for _, team := range teams {
isArchived := team.GetIsArchived()
if isArchived == nil {
fmt.Println("is nil")
}
}
I've just seen this in the documentation:
This API has a known issue where it returns only the id, displayName, and description properties of a team.To get all properties, use the Get team operation.
https://developer.microsoft.com/en-us/graph/known-issues/?search=13633
Is there any fix in preparation for this in the near future?
@buechele As noted this is an service layer issue and not an issue with the SDK and I can't give you an estimate at the moment. You will need to use the Get Team operation for now until the issue is resolved.
@rkodev Ok, many thanks for this clarification!
I want to check if a team is archived but the Teamable entity delivers nil in every case.