I am trying to run a provider-hosted app on my SharePoint 2013 environment. I have not modified any code generated by VS 2012. I have followed the instructions provided in this link before setting up and running the app.
When I run the app from Visual Studio, I get the page where I opt to trust the app. However, I get the 401 Unauthorized error when I try to access the app from the site. I followed the instructions provided in this link to troubleshoot this issue, but was not able to find an example implementation of Set-SPAppPrincipalPermission cmdlet. I made sure that the other conditions are satisfied before trying the cmdlet option.
Does anyone know how to fix this issue? Is there an example code snippet of the SPAppPrincipalPermission cmdlet that I can refer to? Please let me know.
Any help is highly appreciated!