14

for simplicity I will state the obvious! user is not authenticated and resource requires authentication this tells me there is somthing wrong going on with the hand shaking (your certificate is not sent or is wrong), as its a microsoft product the best place is to look at msdn. to make it clear please read this: The following step is optional. ...


10

Where does the code lies for Provider Hosted App? does it lie in SharePoint server? The code for provider hosted app lies in remote web. Remote web is a web application that is hosted outside sharepoint server. For on prem installations one needs to set up high trust between sharepoint and remote web using certificates. How should we call the web ...


9

There is currently some issue going on at Microsoft's end(across most regions) because of which you are not able to install app in App Catalog. This is affecting both SPFx solutions as well as SharePoint addins (Provider-hosted and SharePoint-hosted). Nothing you can do at the moment. Check your service health status -> Health -> Service health -> ...


7

I faced the similar issue. In my case, I went to Site Settings -> Recycle Bin removed the app from there and then went to second stage recycle bin and deleted from there as well. After that, the event receiver fired.


7

Right click on your solution -> Select Set Startup Projects -> Choose Multiple Startup Projects -> and select Start action for both app and app web projects. Also, app web project should be the first one. This should do the trick.


6

First, you need to have a SharePoint app web in your provider hosted app project in order to make calls back into SharePoint using the Cross Domain Library (this is not included by default in a provider hosted app solution) Second, you'll need to load the following JS files from from the layouts directory of your SharePoint site (you can do this by ...


6

You need to have app web for that. In provider hosted app, app web is not present by default. Create an empty module or list in your app web; basically in SP project which gets created when you create a provider hosted app and then you will have context. Besides that, why do you need context of app web of you don't have anything in there?


6

You can use below logic List list = web.Lists.GetByTitle("listtitle"); ListItem item = list.GetItemById(1); var attachment = new AttachmentCreationInformation(); attachment.FileName = "fileName"; attachment.ContentStream = new MemoryStream(System.IO.File.ReadAllBytes("streamFile")); Attachment att = item.AttachmentFiles.Add(attachment); ...


6

You need go add OfficeDev PnP Nuget package in your project. Depending on if you're developing for online or on-premise.


6

Provider hosted apps are divided into two different categories in terms of authentication mechanism. These are low-trust apps and high-trust apps, both use OAuth for authentication. Low trust apps use Azure Access Control Services (ACS) in order to obtain OAuth access token, high trust apps use certificate in order to generate access token right ...


6

Finally, I got the solution after lots of googling and brain-stroming. I am not able to solve the REST API - 403 error issue but I got work around for this. I have created Web APIs in MVC project for all SharePoint operations that I wanted to do using REST API. Create Filter for getting SharePoint context in Web API for SharePoint operations. 3 easy Steps:...


5

Has your method the following attributes? [SharePointContextFilter] But more important. Are in your MVC application included the SharePoint context file? SharePointContext.cs and TokenHelper.cs You can find them here: http://code.msdn.microsoft.com/sharepoint/


5

According to SharePoint 2013 Online App: 403 Response While Downloading Documents from a Document Library article this error occurs when using oAuth App authentication model since Microsoft.SharePoint.Client.File.OpenBinaryDirect method doesn't pass App token The solution is to use Microsoft.SharePoint.Client.File.OpenBinaryStream method instead as ...


5

Using List.Hidden property to make it hidden from UI is not enough to prevent users from accessing it. Consider to utilize List.BreakRoleInheritance to specify unique role assignments for a List, for example: var list = ctx.Web.Lists.GetByTitle(listTitle); list.Hidden = false; list.BreakRoleInheritance(false,false); //clear role assignments for a List ...


5

Well as for me you can always register the app for the first time on one of the tenants, use the registration data in Azure and in .app file and then, when installing the app on other tenants instead of clicking on generate button in appregnew.aspx, simply paste the client id and client secret you have generated when installing the app for the first time. ...


5

You'll need the MSOnline module, which you can download from here (I have 1.1.166.0, I cannot say if this will work on an older version). The following worked for me: $clientId = [System.Guid]::NewGuid() $appDomain = "HelloWorld.windowsazure.net" $appName = "Hello World Test App" $servicePrincipalName = @("$clientId/$appDomain") $appUrl = "https://...


5

Use Folder.ListItemAllFields property to retrieve folder associated list item properties Example Folder folder = ctx.Web.GetFolderByServerRelativeUrl(folderUrl); ctx.Load(folder,f => f.ListItemAllFields); ctx.ExecuteQuery(); Console.WriteLine(folder.ListItemAllFields["Title"]);


5

I haven't tried this practically, but I am sharing based on my understanding. Please feel free to comment if any thing is practically incorrect. Approach-1: Just configure the new domain with the old domain name. So only hosting location will change, the app will still have valid domain name to redirect. Approach-2: While registering the Provider Hosted ...


5

If you are finding it difficult to debug your remote event receiver, most probably you would be using an incorrect connection string to connect to the Microsoft Azure Service Bus. Visual Studio Error List will show “Cannot register Services/RemoteEventReceiver1.svc on Microsoft Azure Service Bus: The remote server returned an error: (500) ...


4

Get Users from People Picker In the MSDN article you already probably know: http://msdn.microsoft.com/en-us/library/jj713593%28v=office.15%29.aspx In this article you have the function: // Query the picker for user information. function getUserInfo() { // Get the people picker object from the page. var peoplePicker = this.SPClientPeoplePicker....


4

As explained here in MSDN we need to app redirect something like this https://{SharePoint Server Name}/_layouts/15/appredirect.aspx?client_id={the app client Id}&redirect_uri={URL} Client Id - would be the "App Identifier" from the Site App Permissions page. Redirect URI - will be the app url you get when you navigate to. Both these query strings ...


4

You can get an idea about where your Office 365 data is stored at Microsoft Online Services - Where is my data? According to that your data is probably in the region closest to where the admin stated the company resided. If you're using CSOM (Client Side Object Model) from server code then you should probably place your App in the same region. But if your ...


4

As explained in detail in the MSDN article "Register SharePoint Add-ins 2013" the regeneration of the ClientId is part of a feature of Microsoft Office Developer Tools for Visual Studio described as "temporary registration". I've found a way to work around this feature and build and debug my add-in in Visual Studio without having its ClientId change every ...


4

Answers of your questions: You will need FullControl permission to create group. No. You can take reference from here. No. SharePoint uses an App Only context it really doesn’t matter what rights the end user has on the content – all that matters is what rights have been granted to the App. Because the App can effectively run with elevated privileges (i.e. ...


4

A1: For the most part the process of developing apps for SharePoint 2013, 2016 and SharePoint Online is the same. The one big difference in the authentication model used by Provider-hosted apps. If you have an on-premises farm you need to use a model called Server-to-Server (a.k.a STS or high-trust) authentication. If you have a hybrid deployment (i.e. both ...


4

Yes it is possible. I worked on a provider hosted add-in which I deployed in IIS and was used by O365. When you create the add-in, give O365 site URL and log in. After that select SP Online as earliest version of SP that you want your app to target. Next you can select Web Forms or MVC according to your wish and use Windows Azure Access Control Service (for ...


4

Q: Can we develop a Provider Hosted App in SharePoint online without using Azure? A: Yes, it is possible to develop Provider Hosted App for SharePoint Online without using Azure. How? Lets have step by step procedure. Step-1: Register your app using appregnew.aspx Login to your SharePoint Online environment and navigate to the following URL for ...


4

If you want to create Remote Event Receiver for List on Host Web, the following articles for your reference: Attaching Remote Event Receivers to Lists in the Host Web Remote Event Receiver (RER) for Host Web using SharePoint Provider Hosted App in Office 365/SharePoint Online Environment OR There are two ways to deploy your event receiver, Check This ...


3

When developing a high trust provider hosted app in VS, you are asked "How do you want you app to authenticate". Here you have got two options. If you are developing for on premise you can select "Use a certificate". The certificates are created in IIS. See this for more information on setting up dev environment for provider hosted apps. http://...


3

The link you provided for client side people picker, it only works for sharepoint hosted apps. That's why you are getting the JavaScript error. You cannot use server side people picker in your provider hosted app as this is not supported at all. I don't think there is a any direct way to use SharePoint's people picker for provider hosted apps. A provider ...


Only top voted, non community-wiki answers of a minimum length are eligible