# Dashboard Access with windows authentication

**URL:** <https://discuss.hangfire.io/t/dashboard-access-with-windows-authentication/294>\
**Category:** question\
**Tags:** configuration, authorization, dashboard\
**Created:** [October 14, 2014, 8:52am UTC](https://discuss.hangfire.io/t/dashboard-access-with-windows-authentication/294 "2014-10-14T08:52:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dohsan](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dohsan](https://discuss.hangfire.io/u/dohsan)\
**Post date:** [October 14, 2014, 8:52am UTC](https://discuss.hangfire.io/t/dashboard-access-with-windows-authentication/294/1 "2014-10-14T08:52:30Z")

</div>

After having issues accessing the dashboard, I found in the user guide that access by default is only for local requests

[http://docs.hangfire.io/en/latest/users-guide/deployment-to-production/configuring-authorization.html](http://docs.hangfire.io/en/latest/users-guide/deployment-to-production/configuring-authorization.html)

I’ve installed the NuGet package as per the guide

_Install-Package Hangfire.Dashboard.Authorization_

However, the site we’re using Hangfire on is an intranet site using windows authentication.

My question - is it possible to allow access to the dashboard using windows authentication? If so how would it need to be setup?

---

<div class="post-metadata">

**Author:** ![hieupious](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/hieupious/32/408_2.png) [@hieupious](https://discuss.hangfire.io/u/hieupious)\
**Post date:** [October 30, 2015, 8:04am UTC](https://discuss.hangfire.io/t/dashboard-access-with-windows-authentication/294/2 "2015-10-30T08:04:09Z")

</div>

Hi @dohsan,

Please try it

```
public class HangfireAuthorizationFilter : IAuthorizationFilter
    {
        public bool Authorize(IDictionary<string, object> owinEnvironment)
        {
            var context = new OwinContext(owinEnvironment);
            return context.Authentication.User.Identity.IsAuthenticated && context.Authentication.User.IsInRole("Administrator");
        }
}

app.UseHangfireDashboard("/hangfire", new DashboardOptions
            {
                AuthorizationFilters = new[] { new HangfireAuthorizationFilter() }
            });

```

My system also use windows authentication and it works well.
