WebPart
10 TopicsError: AADSTS500011: The resource principal named '*URL*' was not found in the tenant.
We are trying to add an app to our SharePoint Online site using the template from https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part and we get the error below when we deploy to SharePoint and add the app/Webpart to a test SharePoint site. Found [object Object]Driver Display External Error: Error: AADSTS500011: The resource principal named https://driverdisplayexternal.azurewebsites.net was not found in the tenant named 7018324c-9efd-4880-809d-b2e6bb1606b6. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant. Trace ID: 358b22eb-cd2c-4091-b592-5a57cbc21d00 Correlation ID: ec96d656-1a36-42e2-a2b9-3ff78efc1e2e Timestamp: 2019-10-01 16:26:06Z We have added a call to our own client as shown below. We are not sure why the resource principal was not found. The Tenant ID's match and things seem to be set up properly for authentication. Has anyone else encountered this issue or know where to look for the issue? Thanks in advance!7.8KViews0likes2CommentsLinking Webparts in Classic SharePoint
Hi all, I manage a quality management system and on a classic page I have it set up to filter documents from a document library. The elements are the site page is in classic, in which a table has three columns this calls up two lists (Business area and Document type) which occupy the first two columns (one in each). The result in the third columns pulls from the document library all documents that meet the first two criteria selections. So lets say the Business area in the first column I select Logistics from the list and then Procedures in the second columns list, the third list will show all procedure documents from logistics. Problem is when you first go into the page it already has a selection in the first two columns with the results showing. I would like have it so it shows all the documents from the business area showing, the document type is empty and you then need to choose a filter to refine the list. can this be done? Due to sensitivity of work I cannot show screenshots which may not help.649Views0likes0CommentsAdding HTML from an internal file to a Web Part on SharePoint
I have developed a SharePoint Web Part where I have an iframe that I need to load with several pages depend on different values. For instance, I have this files file1.html file2.html file3.html And I need to pass the path of one of this elements to an iframe Where can I put this files and How can I retrieve the right path of this pages? Regards860Views0likes0CommentsHow can I auto-logged an user inside a Sharepoint Web Part?
I have a website "Play web". When I want to access into this site I have to login previously with user/pass. An authtentication module, handle this info and starts a communication with an Azure AD. If the user is validated properly using a callback the control is returned to the Play Web with the user logged. All these steps works fine. Where is the problem?. One of our clients wants to embed this "Play web" inside his Sharepoint but he doesn't want relogin. He needs to use the Sharepoint context to autologged the user into the website. Is there any way to do this?, Should have I setup something in Azure AD: Proxy, Function? I'm stuck with this. RegardsSolved4KViews0likes3CommentsHow to securize redirection with Azure AD in a WebPart?
I have developed a Sharepoint Webpart. The aim of this component is simple, authenticate the user in an external website that is embedded inside de Sharepoint. The external website uses Azure AD to login the users. The problem that I have is the following. I know how to get obtain an access token, and the component works fine, with a great security leak. This is that I have public render(): void { token="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; <iframe img src="https://www.example.org/oauthCallback.html?token="+token/> } For this reason, I'm trying to change for something like: public render(): void { <iframe img src="Azure redirection"/> } Azure redirection -> verify the user context with Azure AD -> redirect the callback to https://www.example.org/oauthCallback.html I want securize this process with Azure AD, but I don't know how to do. Any idea? Regards1KViews0likes1CommentHow can I get the user token from the context in a Sharepoint WebPart?
I have been working in a Sharepoint Webpart with TypeScript. I would like to obtain the user token to pass it as a parameter in the headers. How can I do this?. So far, I have something like this: public render(): void { ... let request = this.getRequest(param1); ... } protected getRequest(param1: string): Promise<any> { let loginURL = this.properties.url+"/admin/api/v2/list"; let body = '{"param":"'+param1+'"}'; let requestHeaders: Headers = new Headers(); requestHeaders.append("Accept-Tos", "true"); requestHeaders.append("Content-Type", "application/json"); requestHeaders.append("respondWithObject", "true"); **requestHeaders.append('Authorization', 'Bearer <TOKEN>'); ????** let httpClientOptions: IHttpClientOptions = { body: body, headers: requestHeaders }; return this.context.httpClient.post( loginURL, HttpClient.configurations.v1, httpClientOptions) .then((response: HttpClientResponse): any => { return response.json(); }); } Regards4.4KViews0likes1CommentTesting an updated web part, on a live SharePoint site, without affecting the existing version
Hi Modern experience. I have an updated version of a web part that I need to test on a live SharePoint site. This needs to be done without affecting the existing version of the web part. The workbench is not suitable as I need to test it alongside existing content. I suppose that I need to make the updated web part look like a new web part for testing. Then back like the existing web part when it's ready to go live, but with an updated version number. What do I need to change to achieve this, or is there a better way? Thanks.Solved5.3KViews0likes9CommentsSPFx on a Team Site Homepage Cannot Get Taxonomy Data
Hi, I have an SPFx webpart and an SPFx extensions that getting data from Taxonomy Term Store. Both of them are working well on all pages (Site Content page, Library page, Site page, etc.) except on a Team Site Homepage. I've tried several approaches to get the Taxonomy data in the SPFx code: Add the references to the SharePoint JSOM in the config.json (https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/basics/add-an-external-library) Load SharePoint JSOM in the code (following example from Microsoft's repo: https://github.com/SharePoint/sp-dev-fx-webparts/blob/dev/samples/knockout-taxonomy/src/webparts/termSetRequester/data-helpers/DataHelperSP.ts, even the webpart example doesn't work on a Team Site Homepage) Both of them couldn't get taxonomy data on a Team Site homepage. It's failed on context.executeQueryAsync(...). Is there anyone that has done this before? Or has any workaround idea for this situation? Thanks1.6KViews0likes0CommentsSPFX webpart not rendering data untill browser console is opened
Hi, For a customer we have been asked to make a webpart that can list all the current subsites for the site that a user is on. This was asked to be done using react "DetailList". I am not super familiar with react and while testing my webpart, I noticed that the data did not get rendered or fetched unless I opened the browser console. When I run the webpart a lot of 'requests' are done and my webpart renders the basics, but some requests only get done when I open my console. Only on the moment that I open my browser console, do all the subsites get rendered inside the DetailList. I will include some of the code I wrote to show as to what we did, but is there someone that can verify what causes this behavior, or can tell me how to fetch the data properly to render inside the Detaillist webpart first I pass my httpclient and siteurl to the TSX file by giving it in the react.createElement after that in the constructor of the TSX file, I put the code that will define the state of the component (I know after doing more research that this is not hte best method to do it but I followed an example :) ) the code that is done in the renderlistasync method to give you an example of what happens inside the method ( it was a lot shorter but I experimented a lot to try and find a solution ) when I run my webpart, this is the output that I get when adding the webpart to my workbench on sharepoint Notice the last request that was performed (highlighted in red) now as you can see the in the following picture, the subsites of the current page are not shown inside the webpart Now when I open my browser console, there are 2 new requests that get done : and the webpart suddently gets all the subsites from the current site that the workbench is on. now is there anyone that can explain what is going on here and how I can fix this behavior ? I´ve read about componentDidMount but don´t know for sure if this will fix everything.3.2KViews1like1Comment