We implemented Power BI Embedded, App Owns Data following the documentation. We embed a report following the exact code in the App Owns Data github sample project. However we would like to extend the embedToken expiry time to multiple hours. We tried the following without success:
EmbedToken tokenResponse = await client.Reports.GenerateTokenInGroupAsync(pbi_groupId, report.Id, generateTokenRequestParameters);
DateTime expiration = DateTime.Now + TimeSpan.FromHours(10);
tokenResponse.Expiration = expiration;
But I believe the token is still expiring and the embedded report breaks after aprox one hour. Should this be working or should it be done in another way?
EDIT
After some research it seems like this could be done by changing the life for AccessTokens on Azure Active Directory which I understand defaults to 1h. If this is the case I'd appreciate instructions on how to do this on AAD, preferably via de Portal.