Skip to content
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

Missing GetIsArchived() result on Teamable entity #727

Closed
buechele opened this issue Jun 7, 2024 · 7 comments
Closed

Missing GetIsArchived() result on Teamable entity #727

buechele opened this issue Jun 7, 2024 · 7 comments

Comments

@buechele
Copy link

buechele commented Jun 7, 2024

I want to check if a team is archived but the Teamable entity delivers nil in every case.

@rkodev
Copy link
Contributor

rkodev commented Jun 12, 2024

Hi @buechele could you share a snippet of the code you are executing

@rkodev rkodev added the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label Jun 12, 2024
@buechele
Copy link
Author

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().

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 12, 2024
@rkodev
Copy link
Contributor

rkodev commented Jun 12, 2024

kindly share the sdk call you make in the function getTeamIds(graphClient, nil)

@rkodev rkodev added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs Attention 👋 labels Jun 12, 2024
@buechele
Copy link
Author

@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")
	}
}

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 12, 2024
@buechele
Copy link
Author

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?

@rkodev
Copy link
Contributor

rkodev commented Jun 12, 2024

@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 rkodev added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs Attention 👋 labels Jun 12, 2024
@buechele
Copy link
Author

@rkodev Ok, many thanks for this clarification!

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 12, 2024
@rkodev rkodev closed this as completed Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants