Closed hmendezm closed 6 years ago
Hi @hmendezm,
Didn't actually get what and how to reproduce. Any combinations I tried whatever the crazy they were just worked for me.
I guess, that it's about the configuration of the context of your application in SP. Isn't it some sort SPA deployed to a SP page not as a webpart but a full page source? I would recommend use another approach and host an "app" within CEWP, yet style it as a full page if needed.
For example, CEWP source html file body:
<div id="wrapper">
<div id="app">My app</div>
</div>
<style>
.ms-rtestate-field #wrapper {
position: fixed;
width: 100%;
left: 0;
top: 50px;
z-index: 100;
background: #fff;
overflow: auto;
bottom: 0px;
}
#app {
padding: 1em;
}
.ms-rtestate-write #wrapper {
position: relative;
}
</style>
To look like:
While it's actually a CEWP and all the standard context and scripts are on the page by default:
Let's pretend it's 2013 and no SPFx world is there for you yet. =)
But it absolutely a separate question.
Regard PnPjs, sp.configure worked for me as well, however, could you try this:
import { sp } from '@pnp/sp';
sp.setup({ sp: { baseUrl: webAbsoluteUrl }});
// OData headers for 2013 if it's a case
sp.profiles.myProperties.get().then(console.log);
Thank you for your interest in the sp-pnp-js library. We wanted to mention that this library is being deprecated in July 2018 in favor of the new scoped pnpjs libraries. You should begin transitioning your existing projects when possible or start new projects with the new libraries. Please see the transition guide for more details on migrating and be sure to let us know if you have any questions. Thanks!
Thanks KoltyaKov. My problem was the User profile service itself. it was not synchronizing correctly.
Best, hmendezm
Category
[ ] Enhancement
[ ] Bug
[X] Question
Version
Please specify what version of the library you are using: [ 3.0.9 ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Expected / Desired Behavior / Question
Hi Guys,
I am using pnp.sp.profiles.myProperties to get all information of the logged In user from the Userprofile.
Observed Behavior
I get the error "[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (getmyproperties, line 0) https://_____________/sites/_________/_api/sp.userprofiles.peoplemanager/getmyproperties"
Steps to Reproduce
index.html
Thanks!