GithubHelp home page GithubHelp logo

Comments (7)

davidmoten avatar davidmoten commented on June 14, 2024

Peculiar, I'll check it out...

from odata-client.

davidmoten avatar davidmoten commented on June 14, 2024

It's there:

client.users("123").get().getMailboxSettings();

from odata-client.

davidmoten avatar davidmoten commented on June 14, 2024

BTW latest version is 0.1.41

from odata-client.

davidmoten avatar davidmoten commented on June 14, 2024

Ah, I think I see a bug. If I do this:

GraphService client = MsGraph.explorer().build();
System.out.println(client.me().get().getMailboxSettings());

I get

Optional.empty

but if I do:

GraphService client = MsGraph.explorer().build();
System.out.println(client.me().select("mailboxSettings").get().getMailboxSettings());

I get

Optional[MailboxSettings[archiveFolder=AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OAAuAAAAAAAiQ8W967B7TKBjgx9rVEURAQAiIsqMbYjsT5e-T7KzowPTAAAAAAFNAAA=, automaticRepliesSetting=AutomaticRepliesSetting[externalAudience=ALL, externalReplyMessage=, internalReplyMessage=, scheduledEndDateTime=DateTimeTimeZone[dateTime=2020-10-07T07:00:00.0000000, timeZone=UTC],unmappedFields={},odataType=null, scheduledStartDateTime=DateTimeTimeZone[dateTime=2020-10-06T07:00:00.0000000, timeZone=UTC],unmappedFields={},odataType=null, status=DISABLED],unmappedFields={},odataType=null, dateFormat=M/d/yyyy, delegateMeetingMessageDeliveryOptions=SEND_TO_DELEGATE_ONLY, language=LocaleInfo[displayName=English (United States), locale=en-US],unmappedFields={},odataType=null, timeFormat=h:mm tt, timeZone=Pacific Standard Time, workingHours=WorkingHours[daysOfWeek=[MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY], endTime=17:00, startTime=08:00, timeZone=TimeZoneBase[name=Pacific Standard Time],unmappedFields={},odataType=null],unmappedFields={},odataType=null],unmappedFields={},odataType=null]

I'll chase it down.

from odata-client.

davidmoten avatar davidmoten commented on June 14, 2024

So odata-client-msgraph is behaving itself but according to the OData spec you should just be able to call client.me().mailboxSettings().get(). I'll have a look at that in a bit. First I'll try and find out how the user should know when to add .select("X") to get the expanded property.

from odata-client.

davidmoten avatar davidmoten commented on June 14, 2024

Ah, it's not a bug, this is expected behaviour.

From https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http:

Note: Getting a user returns a default set of properties only (businessPhones, displayName, givenName, id, jobTitle, mail, mobilePhone, officeLocation, preferredLanguage, surname, userPrincipalName). Use $select to get the other properties and relationships for the user object.

from odata-client.

madanbisht avatar madanbisht commented on June 14, 2024

Thanks for the quick response below works fine.

                        graphObject()
                            .users(mailid)
                            .select("mailboxSettings")
                            .get()
                            .getMailboxSettings());

from odata-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.