<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OData - Microsoft Graph API - UnexpectedXmlElement in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/OData-Microsoft-Graph-API-UnexpectedXmlElement/m-p/1529276#M26668</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little new to API calls. Would appreciate assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The setup in the query statement below was working fine up until November 18th, 2020:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MicrosoftGraphAPI_Issue.png" style="width: 980px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/409043i80AC908B776D950B/image-dimensions/980x230?v=v2" width="980" height="230" role="button" title="MicrosoftGraphAPI_Issue.png" alt="MicrosoftGraphAPI_Issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After which point it can no longer refresh due to the below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DataSource.Error: OData: The feed's metadata document appears to be invalid. Error: The metadata document could not be read from the message content.
UnexpectedXmlElement : The schema element 'NavigationProperty' was not expected in the given context. : (1, 376318)

Details:
    DataSourceKind=OData
    DataSourcePath=https://graph.microsoft.com/v1.0/$metadata&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering as to what I can do to resolve the error. I've investigated as best I can, but cannot seem to understand why it's happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query statement is below, with confidential information redacted:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
     TokenUri = "https://login.microsoftonline.com/" &amp;amp; #"Azure Tenant Id" &amp;amp; "/oauth2/token",
     ResourceId = "https://graph.microsoft.com",
     TokenResponse = Json.Document(Web.Contents(TokenUri,
     [
     Content = Text.ToBinary(Uri.BuildQueryString([client_id = #"Azure Application Id", resource = ResourceId, grant_type = "client_credentials", client_secret = #"Azure Application Client Secret"])),
     Headers = [Accept = "application/json"], ManualStatusHandling = {400}
         ]
     )),
     AzureAccessToken = TokenResponse[access_token],
    Source = OData.Feed("https://graph.microsoft.com/v1.0/teams/12a3bc4d-ab56-12a3-1a23-123456ab7def/schedule", null, [Headers = [Authorization = "Bearer " &amp;amp; AzureAccessToken, Implementation="2.0", #"MS-APP-ACTS-AS" = "1234a567-12a3-1a23-1234-1ab2c345678d"]])
in
    Source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your assistance in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;~Rice&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2020 17:35:56 GMT</pubDate>
    <dc:creator>Rice</dc:creator>
    <dc:date>2020-12-02T17:35:56Z</dc:date>
    <item>
      <title>OData - Microsoft Graph API - UnexpectedXmlElement</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/OData-Microsoft-Graph-API-UnexpectedXmlElement/m-p/1529276#M26668</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little new to API calls. Would appreciate assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The setup in the query statement below was working fine up until November 18th, 2020:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MicrosoftGraphAPI_Issue.png" style="width: 980px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/409043i80AC908B776D950B/image-dimensions/980x230?v=v2" width="980" height="230" role="button" title="MicrosoftGraphAPI_Issue.png" alt="MicrosoftGraphAPI_Issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After which point it can no longer refresh due to the below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DataSource.Error: OData: The feed's metadata document appears to be invalid. Error: The metadata document could not be read from the message content.
UnexpectedXmlElement : The schema element 'NavigationProperty' was not expected in the given context. : (1, 376318)

Details:
    DataSourceKind=OData
    DataSourcePath=https://graph.microsoft.com/v1.0/$metadata&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering as to what I can do to resolve the error. I've investigated as best I can, but cannot seem to understand why it's happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query statement is below, with confidential information redacted:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
     TokenUri = "https://login.microsoftonline.com/" &amp;amp; #"Azure Tenant Id" &amp;amp; "/oauth2/token",
     ResourceId = "https://graph.microsoft.com",
     TokenResponse = Json.Document(Web.Contents(TokenUri,
     [
     Content = Text.ToBinary(Uri.BuildQueryString([client_id = #"Azure Application Id", resource = ResourceId, grant_type = "client_credentials", client_secret = #"Azure Application Client Secret"])),
     Headers = [Accept = "application/json"], ManualStatusHandling = {400}
         ]
     )),
     AzureAccessToken = TokenResponse[access_token],
    Source = OData.Feed("https://graph.microsoft.com/v1.0/teams/12a3bc4d-ab56-12a3-1a23-123456ab7def/schedule", null, [Headers = [Authorization = "Bearer " &amp;amp; AzureAccessToken, Implementation="2.0", #"MS-APP-ACTS-AS" = "1234a567-12a3-1a23-1234-1ab2c345678d"]])
in
    Source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your assistance in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;~Rice&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 17:35:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/OData-Microsoft-Graph-API-UnexpectedXmlElement/m-p/1529276#M26668</guid>
      <dc:creator>Rice</dc:creator>
      <dc:date>2020-12-02T17:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: OData - Microsoft Graph API - UnexpectedXmlElement</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/OData-Microsoft-Graph-API-UnexpectedXmlElement/m-p/1557724#M26810</link>
      <description>&lt;P&gt;I am facing the same issue as well, also since mid November.&lt;BR /&gt;Frustration = high.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 22:02:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/OData-Microsoft-Graph-API-UnexpectedXmlElement/m-p/1557724#M26810</guid>
      <dc:creator>systemic_till</dc:creator>
      <dc:date>2020-12-17T22:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: OData - Microsoft Graph API - UnexpectedXmlElement</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/OData-Microsoft-Graph-API-UnexpectedXmlElement/m-p/1731377#M28473</link>
      <description>&lt;P&gt;I have the same problem:&lt;/P&gt;&lt;P&gt;some users I have an error and others do not&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DataSource.NotFound: OData: Request failed (404): Error en el servidor remoto: (404) No se encontró. (Resource 'manager' does not exist or one of its queried reference-property objects are not present.)&lt;BR /&gt;Detalles:&lt;BR /&gt;DataSourceKind=OData&lt;BR /&gt;DataSourcePath=&lt;A href="https://graph.windows.net/xxxxxxx.com.mx/directoryObjects/4fc95bc9-9efe-4645-8603-04213b6a9f9d/Microsoft.DirectoryServices.User/manager" target="_blank"&gt;https://graph.windows.net/xxxxxxx.com.mx/directoryObjects/4fc95bc9-9efe-4645-8603-04213b6a9f9d/Microsoft.DirectoryServices.User/manager&lt;/A&gt;&lt;BR /&gt;Url=&lt;A href="https://graph.windows.net/xxxxxxx.com.mx/directoryObjects/4fc95bc9-9efe-4645-8603-04213b6a9f9d/Microsoft.DirectoryServices.User/manager?api-version=1.6" target="_blank"&gt;https://graph.windows.net/xxxxxxx.com.mx/directoryObjects/4fc95bc9-9efe-4645-8603-04213b6a9f9d/Microsoft.DirectoryServices.User/manager?api-version=1.6&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 22:18:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/OData-Microsoft-Graph-API-UnexpectedXmlElement/m-p/1731377#M28473</guid>
      <dc:creator>Galen</dc:creator>
      <dc:date>2021-03-18T22:18:47Z</dc:date>
    </item>
  </channel>
</rss>

