Forum Discussion
john john
Dec 17, 2018Iron Contributor
Conditional Home Page redirection based on the login user department
We have a sharepoint classic team , and i created a new modern page "OurCompany.aspx" and i set it as the home page for our site. then i added modern pages for each department; HR.aspx , IT.aspx, Fin...
Deleted
Dec 17, 2018You can only set permissions for the sites.
For example, The IT user can enter only the IT site but will get an Unauthorized Access message when trying to access another site.
There no are redirections in Sharepoint.
- john johnDec 17, 2018Iron Contributor
Deleted wrote:You can only set permissions for the sites.
For example, The IT user can enter only the IT site but will get an Unauthorized Access message when trying to access another site.
There no are redirections in Sharepoint.ok thanks for the reply. but can we achieve this using coding or development approaches ?
- DeletedDec 17, 2018I don't think so, as the websites in SharePoint are not designed like this, as far as I know.
You may however, just send the specific site link to a specific user instead of the homepage if it helps with the query.- Dec 17, 2018Quizhed is correct, you need some custom code to achieve this functionality...basically:
(1) In a classic page, you can add the redirection code in a Content Editor / Script Editor WebPart
(2) For modern pages, you need either a SPFx WebPart that allows to inyect the redirection code or create a SPFx Extension