我有一个.NET Framework MVC应用程序,该应用程序已为基于会话的Azure AD配置了身份验证。用户登录后,我需要获取访问承载令牌和刷新令牌,以供前端用于Power BI javascript嵌入。我无法找到一种为此目的从服务器获取访问权限的方法。
以下是设置Start.Auth.cs的方式:
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions ());
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientId,Authority = authority,Redirecturi = redirecturi
});
我需要一个基于用户的身份验证访问令牌来传递给Power BI javascript嵌入,以便标识用户,而不是基于客户端ID /客户端机密服务器的令牌。