rogerOlier / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

GroupsService.RetrieveAllMembers #618

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

AppsService service = new AppsService(domain,user,password);
var members = service.Groups.RetrieveAllMembers("test");
Console.WriteLine(members.Entries.First().Title.Text);

What is the expected output? What do you see instead?

Expected output is the entry information, but instead it's null. The number of 
entries is correct if I use:

Console.WriteLine(members.Entries.Count); 

So I know the person has the correct permissions.

What version of the product are you using? On what operating system?

Please provide any additional information below.

version 2.1

Original issue reported on code.google.com by jamier....@gmail.com on 24 Aug 2012 at 7:27

GoogleCodeExporter commented 8 years ago
A member entry from the Provisioning API looks like the following:

<entry>
        <id>https://apps-apis.google.com/a/feeds/group/2.0/domain.com/testgroup/member/testuser%domain.com</id>
        <updated>2012-08-24T19:42:59.041Z</updated>
        <link rel='self' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/group/2.0/domain.com/testgroup/member/testuser%domain.com'/>
        <link rel='edit' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/group/2.0/domain.com/testgroup/member/testuser%domain.com'/>
        <apps:property name='memberType' value='User'/>
        <apps:property name='memberId' value='testuser@domain.com'/>
        <apps:property name='directMember' value='true'/>
</entry>

As you can see, the title property is not set, that's why it is empty.

Original comment by ccherub...@google.com on 24 Aug 2012 at 7:45

GoogleCodeExporter commented 8 years ago
So how would you access that from .NET?

Original comment by jamier....@gmail.com on 24 Aug 2012 at 7:49

GoogleCodeExporter commented 8 years ago
A MemberEntry has properties such as MemberId or MemberType, check the source 
for the complete list:

http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/src/gapps/m
emberentry.cs

Original comment by ccherub...@google.com on 24 Aug 2012 at 7:54

GoogleCodeExporter commented 8 years ago
Ok, I see now. This is way different than the version we were previously using. 
We are upgrading from the 1.6 and it's way different. I see now. Thanks.

Original comment by jamier....@gmail.com on 24 Aug 2012 at 8:13

GoogleCodeExporter commented 8 years ago
In this line of code:

AppsService service = new AppsService(domain,user,password);
var members = service.Groups.RetrieveAllMembers("test");
Console.WriteLine(members.Entries.First().Title.Text);

Im getting this err:

An unhandled exception of type 'System.ArgumentException' occurred in 
mscorlib.dll

Additional information: Stream was not readable.

AnyHelp

Original comment by elbrothe...@gmail.com on 24 Jul 2015 at 8:59