Hi @Acrith and welcome to the forums. So glad you asked this question, as this is something I wanted to achieve myself, and I managed to do it using the following:-
$Navigation = New-UDSideNav -Endpoint {
New-UDSideNavItem -Text "HOME" -PageName "Home" -Icon home
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "HELP" -PageName "Help" -Icon question
if (Get-ADGroupMembers "UD_Complaints_Managers" | Where-Object { $_.SamAccountName -match $User }) {
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "ALL COMPLAINTS" -PageName "AllComplaints" -Icon chart_line
}
if (Get-ADGroupMembers "UD_Complaints_Managers" | Where-Object { $_.SamAccountName -match $User }) {
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "MY COMPLAINTS" -PageName "AssignedComplaints" -Icon user_cog
}
if (Get-ADGroupMembers "UD_Complaints_Managers" | Where-Object { $_.SamAccountName -match $User }) {
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "COMPLAINT HISTORY" -PageName "History" -Icon calendar_alt
}
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "EDIT COMPLAINT" -PageName "Edit" -Icon pen_alt
if (Get-ADGroupMembers "UD_Complaints_Users" | Where-Object { $_.SamAccountName -match $User }) {
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "MY COMPLAINTS" -PageName "MyComplaints" -Icon chart_pie
}
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "NEW COMPLAINT" -PageName "New" -Icon plus_circle
if (Get-ADGroupMembers "UD_Complaints_Managers" | Where-Object { $_.SamAccountName -match $User }) {
New-UDSideNavItem -Divider
New-UDSideNavItem -Text "STATISTICS" -PageName "Statistics" -Icon chart_pie
}
New-UDSideNavItem -Divider
} -Fixed
So I make the sidebar nav menu dynamic depending which security group the user is in. I am using the same function Get-AdGroupMembers as I used in the sample of mine you found on github Then you also need to add the authorisation parameter in your pages:-
New-UDPage -Name "Home" -AuthorizedRole @("Administrator", "User") -Title "Welcome To The Complaints System" -Content {
As for the IIS thing I guess it depends on your domain environment, I mean as @adam mentioned check app pool user. Like when you go onto your site in IIS and click BASIC SETTINGS then click the TEST do both come back ok?