Questions tagged [api]
Application Programming Interface (API) is a set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other service. When used as a question tag, please be sure to describe in your question which APIs are being used.
268 questions
1
vote
0
answers
262
views
Manipulate sharepoint group membership using REST API from external app
I have an application that is secured via OpenID Connect / Azure AD.
It is a webapp that is not running as part of the Sharepoint Framework.
However, the app does need to interact with SharePoint in ...
0
votes
1
answer
65
views
Send email to users with expired documents
I want to be able to send email to each user which has expired documents and be able to know when the expiry date email was sent. The item contains worker name, their expiry date, and the heading of '...
1
vote
1
answer
288
views
Static IP address for custom SPFx App and SharePoint Online
I have a custom web part that I'm building using SharePoint Framework to go on my SharePoint Online tenant. The application will be hitting a third-party API to fetch data.
The complication is that ...
1
vote
1
answer
1k
views
Full Text Search Across Document Library
I am attempting to build a powerapp on top of a sharepoint list that can do both full text searching of documents and filter by metadata in the document library.
I am currently stuck on being able to ...
0
votes
1
answer
2k
views
Sharepoint API creating folder 403
I am new to the SharePoint API. I am trying to create folders in a customer SharePoint solution.
Problem is i'm getting a 403 return.
My request.:
POST https://companyname.sharepoint.com/sites/Test/...
0
votes
1
answer
228
views
May I add a custom attribute in SPField SchemaXML to create
Could I add a custom attribute (MyCustomAttribute="true") in SchemaXML of SP.Field and create it by REST API?
<Field Type="Text" DisplayName="AwesomeField" MaxLength=&...
0
votes
2
answers
1k
views
How can I get parent guid of an item?
I have a list with items in SharePoint Online. There many items and their structure look like a tree.
list/
itemA/
itemB/
itemBa/
itemX
itemBb/
...
0
votes
1
answer
105
views
SharePoint High Trust 401 after a day
we are experiencing a really difficult problem and TBH could do with a few ideas of things to check over.
So we have a high trust SharePoint application that works well however it just seems, most ...
0
votes
1
answer
1k
views
AJAX Request to sharepoint REST API But receiving CORS error
I want to request a sharepoint server with ajax but I get an CORS error :
How can I solve this issue please
$.ajax({
url: "http://myserver.com" + "/_api/web/Lists/GetByTitle('...
1
vote
2
answers
6k
views
Retrieve SharePoint file with API using document ID from any document library
In site collection features there is an option to enable Document ID Service. After doing this, whenever a document is uploaded to a document library, a unique document id that is a link to the doc is ...
0
votes
1
answer
72
views
Block SharePoint Online APIs
Is it possible to block people from using SharePoint Online APIs like REST, etc even if they have permissions to access a site?
1
vote
0
answers
148
views
Removing the "Getting Started" webpart with REST API
Is there any way to delete the 'Getting started..' webpart from a workspace (actually the home.aspx) via REST API (or POST request)?
Unfortunaly it is not possible to disable the module on the parent ...
1
vote
1
answer
2k
views
Upload Files >250MB via Sharepoint REST API
So I am trying to upload Files to a Sharepoint Site via the REST API. I am already using the /Files/Add() Path-Function, but that one is (from what I've found) per design locked to 250MB max and ...
0
votes
1
answer
151
views
SharePoint Online Active Authentication with Two Factor Authentication
Is there a way to make the implementation suggested by Vitaly Lyamin, working with Two Factor Authentication?
https://docs.microsoft.com/it-it/archive/blogs/sharepointdevelopersupport/sharepoint-...
1
vote
1
answer
2k
views
Property 'getFolderByServerRelativeUrl' does not exist on type 'IWeb'
I can not access getFolderByServerRelativeUrl() in pnp API.
await sp.web.getFolderByServerRelativeUrl()
Error:
Property 'getFolderByServerRelativeUrl' does not exist on type 'IWeb'.
0
votes
1
answer
2k
views
Failed to Fetch Error while calling Azure Function
I am calling an Azure Function which is publicly accessible from my SPFx web part.
It is a POST Request and I am getting a Failed to Fetch error.
The same API call is working fine if I execute it from ...
2
votes
1
answer
378
views
why returned date from version history is different from actual date (triggerbody)
It seems the SP data repository and front-end SP list use two different timezones. when I get a date from version history it is different from what is actually shown in the SP list, how can I fix this?...
0
votes
1
answer
91
views
Does SharePoint Online have plugin tools for SSRS (SQL Server Reporting Services) or is there an API for accessing and writing reports?
I've been looking around for a while and haven't found anything yet. Any help is much appreciated. Thanks.
0
votes
1
answer
3k
views
Problem with CORS Policy when call to API with SPFx
have problem with CORS Policy. Get an error:
Access to fetch at 'https://XXX.azurewebsites.net/api/protocols' from origin 'https://localhost:4321' has been blocked by CORS policy: No 'Access-Control-...
0
votes
0
answers
30
views
Microsoft Teams API
I have requirements where using Team API I have to perform following tasks
Identify if teams have any files or folders inside it
Get the Teams permission
Conversation, Teams have any private or ...
0
votes
0
answers
29
views
How can i retrieve the datas in one column from a list?
I have a big document library. And i am using C sharp.
When the user selects one document from the frontend website(like click method), I want to be able to get the value in Column A of the selected ...
0
votes
1
answer
62
views
REST API to add replies to a share point discussion
I am able to post a reply to share point discussion with help of below link.
REST Call to Post a Reply to a Discussion Board Topic w/o JSOM
but here for posting a message ContentTypeId is required.As ...
1
vote
0
answers
58
views
Is there an API or web service for Copy-SPSite?
What API endpoint is called for the command Copy-SPSite? Also, is there a WSDL web service for this command, like there is the ExportWeb service in Sites.asmx relating to the command Export-SPWeb?
1
vote
2
answers
2k
views
Problem making 3rd party API POST calls using SPFx
I need to fetch few details from the 3rd party API so I am making a POST request (required by the API) to that API using HttpClient But every time I am getting the below error.
Access to fetch at '...
0
votes
1
answer
99
views
REST or any other API for client side dev to get current users running workflows(Designer or OOTB or MS Flow)?
As part of a requirement the clients would want us to create an SPFX webpart which displays all the document names and the tasks or workflows running on it for that user/current User. Is there a way ...
2
votes
0
answers
97
views
Programmatically grant app permissions to site collection?
Is there an API that let's me register an application (App ID) to a site collection like I would do in the below dialog?
0
votes
1
answer
225
views
Getting 403 error when calling REST API from HTML/JS in sharepoint online
As from now you cannot create custom aspx files in SharePoint Online nor edit them with SharePoint designer.
I'm trying to launch an html with some js (angularJs and jquery) from the same site in ...
0
votes
1
answer
7k
views
SharePoint Online api, no access
We are making an interface with SharePoint.
I did the app registration in AAD, gave SPO degelated permissions via Graph API
API call for access token works fine
API call to get a file keeps erroring ...
0
votes
1
answer
689
views
How to get list of all deleted sites using Microsoft API?
Is there a way to get a list of all deleted sites in sharePoint using Microsoft Graph or SharePoint API? I don’t want to use powershell. I want a api. Thanks in advance
0
votes
1
answer
1k
views
How to list all personal sharepoint sites using microsoft graph?
I want to fetch following data using Microsoft graph API
All the root sites(group + personal)
All group root sites
All personal root sites
For the first case currently I am using https://graph....
0
votes
2
answers
873
views
How to fetch all data associated with a SharePoint web part using Microsoft Graph API?
I am wanting to fetch all of the associated data for the web parts of a SharePoint Page using the Microsoft Graph API. Is this possible through the beta or v1.0 API? I can't seem to find any ...
0
votes
1
answer
2k
views
How can I make a GET request with Headers to an external API?
From a SP Online SPFx Web Part (No Javascript Framework), I've been trying to do a GET request to an API that expects some headers and nothing works.
If use Postman, with the same URL and Headers it ...
0
votes
1
answer
443
views
Get all groups for a user? (by user name)
In javascript, I'm trying to get a list of all the groups to which a user belongs.
For the current user I can use SPServices + GetGroupCollectionFromUser. But for other users I would need the login ...
0
votes
1
answer
2k
views
Error updating document metadata with REST Flow
So I am beating my head against the wall and have done more searching on SE than I ever cared to. I am trying to update the Modified By field for a document in a Document Library on a Sharepoint team ...
1
vote
1
answer
4k
views
Sharepoint API update a file throws Specified value is not supported for the serverRelativeUrl parameter
I am trying to update a file in sharepoint using API. I am trying in POSTMAN only.
Below are the url and headers which i send. I am using PUT Method.
url:
https://groupname.sharepoint.com/sites/MMSN/...
1
vote
1
answer
624
views
How to securely call an external API from SharePoint?
We have a need to connect to some external APIs from SharePoint. I've seen some online articles about calling APIs that are secured with Azure AD, however, in my case I have no control or influence ...
0
votes
1
answer
839
views
API issues downloading image, empty file or corrupted image
What I'm trying to accomplish is this.
I'm working on an integration web app that lets our techs pull data from our crm and sharepoint.
What I'd like to be able to do is display images held in ...
0
votes
1
answer
42
views
API to get all users with specific text in profile
How can I use an api to get all users with a specific text (hashtag) in their user profile field "about me"?
Is this the correct way?
https://mysite/_api/search/query?querytext=%27aboutme:%22*...
0
votes
1
answer
137
views
SharePoint List LookUp field to use API to populate choices
When creating a list in SharePoint, you can choose the "LookUp" field. I would like to have that "LookUp" be able grab information from an API from a different site. Any way to get this process ...
1
vote
1
answer
1k
views
REST api call using method getbyemail for user in a group returns error “Cannot find resource for the request getbytitle”
Users exist in sharepoint group:
If I do simple GET request in browser:
https://mycompany.sharepoint.com/sites/testsite2/_api/web/sitegroups/getbytitle('TestGroup')/users/getbyemail('john.theuser@...
0
votes
1
answer
51
views
How to skip a failed api lookup and pass null parameters instead?
If the "Title" parameter isn't passed via the url, then my initial api call fails, but even failure, I need it continue to the my item save routine.
Unfortunately, an error is thrown on ...
2
votes
2
answers
2k
views
MS Graph presence - forbidden 403 error
I'm getting 403 forbidden error in my SPFx web part when trying to access Teams presence (mine and other users as well). I have set permissions in package-solution:
Permissions:
{
"resource": "...
0
votes
1
answer
392
views
How can i find the Excel services URL for my file?
I'm trying to access through the Excel Rest API an excel file "My Excel File.xlsx", but regardless how I what excel services URL I use, I either get 404 or file does not exist or is deleted.
This is ...
2
votes
2
answers
739
views
Access Graph API from localhost (SharePoint extension)
I'm developing a SharePoint extension (ListViewCommandSet extension).
I have no clue (can't find any docs about this) how to give permissions to access Graph API (even the /me call gives a 403 ...
0
votes
0
answers
42
views
How to get rid of exception on ChangeManager SharePoint?
I am working on SharePoint site notifications using webhook. I have added webhook subscription using the following reference Get started with SharePoint webhooks. I have got Notification from the ...
0
votes
1
answer
3k
views
Get all managers for a user - company hierarchy structure
How to get a list of all managers for a users?
Example:
User A reports to user B
User B reports to user C
User C reports to user D (CEO) and top of the hierarchy.
By giving user A I should get: [B,...
0
votes
1
answer
273
views
SharePoint Online - CSOM API requests for getting site metadata fails when permissions are properly set
I've got an interesting permissions problem with the CSOM API.
We have about 200 site collections.
I have created a Permission Level on each site collection, and have assigned a Service Account AD ...
0
votes
1
answer
11k
views
Authentication methods for SharePoint REST API
Let's say I work in company AAA and want to automatically upload documents to BBB's company SharePoint Online application https://BBB.sharepoint.com using REST API.
My email [email protected] is ...
0
votes
1
answer
7k
views
Managing Content Type using REST API
How can i manage Content Type in SharePoint List using REST API, it's look like a very wide question, isn't it ? well what i'm looking for exactly is:
How to change content type visibility option to ...
2
votes
1
answer
3k
views
Download multiple files at a time from using HTTP Rest API Calls
I am able to download a file from SharePoint using the API GetFolderByServerRelativeUrl.
However I'm looking to download selected files at once from SharePoint. Is there any possibility to do this?