<?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 Token received from embedded API does not respect TokenLifetimePolicy that has been set in policies in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Token-received-from-embedded-API-does-not-respect/m-p/916475#M22150</link>
    <description>&lt;P&gt;I require the embed tokens I receieve back from the embedded API to live longer than the defaulted hour. I followed the information here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-gb/azure/active-directory/develop/active-directory-configurable-token-lifetimes#example-token-lifetime-policies" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-gb/azure/active-directory/develop/active-directory-configurable-token-lifetimes#example-token-lifetime-policies&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and set a new policy for "AccessTokenLifetime" with the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"23:59:59"}}') -DisplayName "WebPolicyScenario" -IsOrganizationDefault $false -Type "TokenLifetimePolicy"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I then assigned this policy to my application using the&amp;nbsp;Add-AzureADApplicationPolicy command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the tokens I get back still have one hour expiration, is there something I am missing? I have also tried setting&amp;nbsp;&lt;SPAN&gt;MaxAgeSessionSingleFactor, but with no success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2020 13:18:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-30T13:18:55Z</dc:date>
    <item>
      <title>Token received from embedded API does not respect TokenLifetimePolicy that has been set in policies</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Token-received-from-embedded-API-does-not-respect/m-p/916475#M22150</link>
      <description>&lt;P&gt;I require the embed tokens I receieve back from the embedded API to live longer than the defaulted hour. I followed the information here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-gb/azure/active-directory/develop/active-directory-configurable-token-lifetimes#example-token-lifetime-policies" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-gb/azure/active-directory/develop/active-directory-configurable-token-lifetimes#example-token-lifetime-policies&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and set a new policy for "AccessTokenLifetime" with the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"23:59:59"}}') -DisplayName "WebPolicyScenario" -IsOrganizationDefault $false -Type "TokenLifetimePolicy"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I then assigned this policy to my application using the&amp;nbsp;Add-AzureADApplicationPolicy command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the tokens I get back still have one hour expiration, is there something I am missing? I have also tried setting&amp;nbsp;&lt;SPAN&gt;MaxAgeSessionSingleFactor, but with no success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:18:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Token-received-from-embedded-API-does-not-respect/m-p/916475#M22150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-30T13:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Token received from embedded API does not respect TokenLifetimePolicy that has been set in polic</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Token-received-from-embedded-API-does-not-respect/m-p/2207801#M33146</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Same here, we tried it with a Service Principal used in our Embed for your Customers scenario but&amp;nbsp;AuthenticationContext -&amp;gt;&amp;nbsp;AcquireTokenAsync never return more than 1 hour in&amp;nbsp;AuthenticationResult.&lt;BR /&gt;We are going to at least make sure to get a full hour instead of a random value (there is a token cache) by using this solution:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Generate-Token-API-returns-token-with-variable-short-expirations/m-p/1042168" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Generate-Token-API-returns-token-with-variable-short-expirations/m-p/1042168&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But did you resolve it any other way?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Frederick&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 13:28:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Token-received-from-embedded-API-does-not-respect/m-p/2207801#M33146</guid>
      <dc:creator>samsonfr</dc:creator>
      <dc:date>2021-11-25T13:28:46Z</dc:date>
    </item>
  </channel>
</rss>

