How many spells can a triton cast per long rest using its Control Air and Water trait?

The triton’s Control Air and Water feature says that:

Once you cast a spell with this trait, you can’t do so again until you finish a long rest.

Does that mean a triton can only cast one spell using this trait per long rest, or can they cast each of their spells once per long rest?

How can I bring a creature back to life 5 times per long rest with the least investment of levels?

Very related: How can I bring a lowly terrestrial invertebrate back to life 5 times per long rest with the least investment of levels?

A character wants to proactively use the Chronicle of the Raven Queen eldritch invocation (from UA: Warlock & Wizard) but must respect the Law of Death — that creatures should be dead when it is ‘their time’ and not otherwise. To satisfy this, the character must ensure that the creatures they ‘question’ are dead for not very much longer than is strictly necessary for the invocation to work. Specifically, the character must end each day with no creature they killed merely for questioning still dead as a result of said killing.

Nevertheless, the character is committed to using the invocation proactively on creatures that they would not otherwise have killed, 5 times per long rest.

What is the least number of levels for such a character to be possible? Assume magic items are gained with levels at the normal rate, and that those items are whatever is most helpful to the build. If you need any mundane items, monies, or things purchasable with money, you should assume the character has an average amount of money from hoards for their level as well as close to the median amount of individual monster treasure. Remember that the character has to have at least three levels in Warlock (the invocation requires the Pact of the Tome), so you can’t e.g. be an 18th-level Rogue (not that that would necessarily solve the problem, just as an example).

Multiclassing and UA are okay, as well as any other first-party sources.

How can I bring an insect back to life 5 times per long rest with the least investment of levels?

I wanna use the Chronicle of the Raven Queen invocation but I don’t wanna leave all the cockroaches, silverfish, and hydrazoa I interrogate dead afterwards (I realize I could take Beast Speach instead, but I don’t wanna). What do I need to multiclass and for how many levels to be able to bring the insects I question back to life after I kill them? They don’t need to be dead for more than a single round.

I want to do this ASAP in terms of levels. 4 levels of Warlock with the Pact of the Tome, the Raven Queen patron, and the Chronicle of the Raven Queen invocation are non-negotiable. Everything else (including race and background, if needed) is available. Magic Items are fine, but be aware of the levels required before I can likely get the party to track one down: Uncommon or Common magic items will be trivial to track down, but a rare item will take me about 5 levels, a very rare 11, and a legendary 14. Consumables are also okay, but I’m only getting like 1 per level on average and getting a legendary consumable isn’t very likely to ever happen before I’m already 20th level.

Does a damaged integrated vehicle regain hit points when its warforged host takes a long rest?

Let’s say the following were to happen:

A warforged has an integrated longship. Their party is traveling along, when suddenly enemy pirates attack! The party emerges victorious, but the longship-warforged has sustained damage. As the party wonders how to repair the sails in the middle of the ocean, the warforged’s player comes up with a spectacular idea: “Wait, he says, I can just take a long rest! If the ship is part of me, and I regain all my hit points from a long rest, my ship should regain all its hit points when I finish a long rest!”

Going by strict RAW, should this work?

Page create with REST missing CEWP

I’m trying to create a publishing page following this thread and the page is being created in the library. Basically using creating a template

<%@ Page Inherits=”Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c” %><%@ Reference VirtualPath=”~TemplatePageUrl” %><%@ Reference VirtualPath=”~masterurl/custom.master” %>

and then sending that as the body to this REST endpoint

/_api/Web/GetFolderByServerRelativeUrl('Pages')/Files/add(url='" + pageName + ".aspx',overwrite=true) 

This creates a page, but doesn’t have the correct page layout or content type.

I tried using REST to set the pagelayout and it didn’t throw an error, but it also didn’t work. I found this thread which shows how to set the page layout via JSOM. I chain it with my REST call to get the docId of the new page and then call this:

var ctx = SP.ClientContext.get_current(); var listPages = ctx.get_web().get_lists().getByTitle('Pages'); var pageItem = listPages.getItemById(docId);  var val = new SP.FieldUrlValue(); val.set_url('_catalogs/masterpage/PageLayouName.aspx'); val.set_description('PageLayoutName'); pageItem.set_item('PublishingPageLayout', val); pageItem.update(); 

That works and does change the page layout for the page. When I open the page for editing I see the metadata associated with the contenttype for the page layout and I see the various webpart zones as defined for my page layout. The pagelayout has several zones, page fields, content query webpart, etc. It almost seems to work, except…

In my page layout I have a content editor webpart snippet defined. That webpart doesn’t show on the page. The zone it is in is there but the webpart just isn’t there.

If I reapply the page layout from the UI using the ribbon the missing webpart shows up.

How can I create a page that properly uses its page layout?

REST Service API executor.executeAsync Call Ends in Failure Function in Sharepoint Hosted App

Any Answers Will Help me to Forward and Gain Knowledge in SharePoint Development

While i am Trying to get the list Items Using Rest API Calls in SharePoint Hosted App Using Below Function

function loadingSamples()  {     var JobListName = "RRR Jobs #";     var executor;     // Initialize the RequestExecutor with the app web URL.     executor = new SP.RequestExecutor("/");      //Fetching the choice values from the Job Status Field, to show in the Dropdown field     executor.executeAsync     ({         url: "/_api/web/lists/getbytitle('" + encodeURIComponent(JobListName) + "')/fields/getbytitle('Job Status')?$  select=Choices",         method: "GET",         headers: { "Accept": "application/json; odata=verbose" },         success: successHandlerStatus,         error: errorHandler     }); } function successHandlerStatus(data)  {     alert("sucesss") }  function errorHandler(data, errorCode, errorMessage)  {     alert("errorMessage") } 

It’s always going to error function named errorHandler With Error Code as -1002 and Error Message as Bad Request and Inside Data -> Body , the Error message is

{     "error":{            "code":"-1,Microsoft.SharePoint.Client.InvalidClientQueryException",         "message":{             "lang":"en-US",             "value":"The expression \"web/lists/getbytitle('DWR Jobs \" is not valid."         }     } } 

Note :

  • This is working code in Sharepoint Hosted App that previously hosted in another Windows server.

  • Now i hosted this App in New windows server,it’s successfully hosted but it gives above mentioned Error in Rest Service Call.

Is this security scheme using passwords, short-lived access JWTs, and long-lived refresh tokens a good way to secure a REST API?

I’m trying to secure a REST API that I’m using as a backend for a single-page application. The API provides access to read/create/modify/delete protected resources, based on a set of permissions managed by an administrator. What I’m thinking is the following:

  • All connections must be over HTTPS; plain HTTP requests will be redirected to HTTPS.
  • Users have a username and password, which they create.
  • A client submits a username/password to a /login route; if it’s a valid password for that user, the server will return a short-lived access token and a long-lived refresh token.
    • The access token will be a signed JWT that identifies the user and has an expiration time.
    • The refresh token will be a GUID corresponding to a row in a database table; this row will store the user ID
  • When accessing protected routes (everything but /login), an access token will be required. The server will verify the signature, and if valid, will check the expiration time. If the token is not expired, the user ID will be made available to server-side code for authorization logic.
  • If the access token is expired, the client will automatically submit the refresh token to a /refresh endpoint for requesting a new access token. The server will check the database; if a corresponding row still exists, a new access token will be returned to the client.

Does this scheme sound secure?

Authenticate SharePoint online REST API without user name and password

I am trying to build a console app that reads the data from SharePoint list.

But i dont want to pass the user credentials in order to authenticate, instead use the token. Is this possible?

I tried using the following code but i get forbidden error while trying to GetFormDigest

        static void Main(string[] args)     {         string sConnStr = "https://sab/sites/DevT";         Uri oUri = null;         oUri = new Uri(sConnStr + "/_api/web/lists/getbytitle('sd')/GetItems");          string sResult = string.Empty;          string stringData = "{'query' : {'__metadata': { 'type': 'SP.CamlQuery' }, 'ViewXml':'<View><Query><Where><Eq><FieldRef Name =\"Title\"/><Value Type=\"Text\">HR</Value></Eq></Where></Query></View>'}}";          HttpWebRequest oWebRequest = (HttpWebRequest)WebRequest.Create(oUri);         oWebRequest.Credentials = CredentialCache.DefaultNetworkCredentials;         oWebRequest.Method = "POST";         oWebRequest.Accept = "application/json;odata=verbose";         oWebRequest.ContentType = "application/json;odata=verbose";         oWebRequest.Headers.Add("X-RequestDigest", GetFormDigest());         oWebRequest.ContentLength = stringData.Length;          StreamWriter writer = new StreamWriter(oWebRequest.GetRequestStream());         writer.Write(stringData);         writer.Flush();          WebResponse wresp = oWebRequest.GetResponse();         using (StreamReader sr = new StreamReader(wresp.GetResponseStream()))         {             sResult = sr.ReadToEnd();         }     }      public static string GetFormDigest()     {         string sFormDigest = null;         string sConnStr = "https://sab/sites/DevT";         Uri oUri = null;         oUri = new Uri(sConnStr + "/_api/contextinfo");          HttpWebRequest oWebRequest = HttpWebRequest.Create(oUri) as HttpWebRequest;         oWebRequest.UseDefaultCredentials = true;         oWebRequest.Method = "POST";         oWebRequest.Accept = "application/json;odata=verbose";         oWebRequest.ContentLength = 0;         oWebRequest.ContentType = "application/json";         string sResult;         WebResponse sWebReponse = oWebRequest.GetResponse();          using (StreamReader sr = new StreamReader(sWebReponse.GetResponseStream()))         {             sResult = sr.ReadToEnd();         }          var jss = new JavaScriptSerializer();         var val = jss.Deserialize<Dictionary<string, object>>(sResult);         var d = val["d"] as Dictionary<string, object>;         var wi = d["GetContextWebInformation"] as Dictionary<string, object>;         sFormDigest = wi["FormDigestValue"].ToString();          return sFormDigest;      } 

Can you cast a spell just before the end of a long rest?

This is quite a cheesy question, but let’s say I have a human wizard. And I’m the last to “stand watch” so I’ve already slept during that rest. This is largely to avoid the incapacitated condition: see this answer to a question about concentration during long rests.

If I cast darkvision before the end of the long rest, then get all my spell slots back at the end of the long rest, do I essentially get darkvision (for the next ~8h) without expending a spell slot?