Reputation: 23
Looking to retrieve the pager attribute for user on Microsoft graph. Doesn't seem to be in v1.0 or beta.
When I run
https://graph.microsoft.com/beta/me/
I get most of the attributes I need however I also need to return the pager attribute.
when i do https://graph.microsoft.com/beta/me?$select=displayname,pager
it doesnt work
I had a look at the meta data and see pager under PhoneType but unsure how to retrieve it.
From https://graph.microsoft.com/beta/$metadata
:
<EnumType Name="phoneType">
<Member Name="home" Value="0" />
<Member Name="business" Value="1" />
<Member Name="mobile" Value="2" />
<Member Name="other" Value="3" />
<Member Name="assistant" Value="4" />
<Member Name="homeFax" Value="5" />
<Member Name="businessFax" Value="6" />
<Member Name="otherFax" Value="7" />
<Member Name="pager" Value="8" />
<Member Name="radio" Value="9" />
</EnumType>
Any help on this would be fantastic. Thanks in advance
Upvotes: 1
Views: 753
Reputation: 33132
Just to be clear, The /beta
version actually returns all of the user's attributes. The /v1.0
version includes a default $select
, but the /beta
version applies no selection or filter criteria of any kind.
More importantly, phoneType
enumeration is not used by the user
entity. It is only used by the person
and contact
entities.
The phoneType
enum is only referenced by the microsoft.graph.phone
type (which comes from Exchange, not AAD):
<ComplexType Name="phone">
<Property Name="type" Type="microsoft.graph.phoneType"/>
<Property Name="number" Type="Edm.String"/>
</ComplexType>
In turn, the type microsoft.graph.phone
is only applied to two resources: person
and contact
(i.e. Outlook Contacts):
<EntityType Name="person" BaseType="microsoft.graph.entity">
<!-- snipp -->
<Property Name="emailAddresses" Type="Collection(microsoft.graph.rankedEmailAddress)"/>
<Property Name="phones" Type="Collection(microsoft.graph.phone)"/>
<Property Name="postalAddresses" Type="Collection(microsoft.graph.location)"/>
<!-- snipp -->
</EntityType>
<EntityType Name="contact" BaseType="microsoft.graph.outlookItem" OpenType="true">
<!-- snipp -->
<Property Name="manager" Type="Edm.String"/>
<Property Name="phones" Type="Collection(microsoft.graph.phone)"/>
<Property Name="postalAddresses" Type="Collection(microsoft.graph.physicalAddress)"/>
<Property Name="spouseName" Type="Edm.String"/>
<!-- snipp -->
</EntityType>
The user
entity does not contain a pager
property (nor most of the others listen in the phoneType
enum).
Upvotes: 2