title: Is it possible to use a Custom Action to add an item to a Site Actions menu in a Sharepoint 2013 app?
body: <p>I've been trying for a while to add a Site Action menu element that would link to my remote app web page, like <a href="http://code.msdn.microsoft.com/SharePoint-2013-Open-e0ca1826" rel="nofollow">this example</a>.  </p>
  
  <p>The problem is that the example is not actually using the custom action to modify a site action menu. This would be easy if I wasn't developping on a Sharepoint app model. When I try to add the custom action to my sharepoint site, nothings happens. I've tried many different variations, all with the same result. Here's what I've settled on, thinking it should work:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
    &lt;CustomAction Location ="Microsoft.SharePoint.StandardMenu"
                  GroupId ="SiteActions"
                  Id="CreateSiteAction"
                  Title="Create Site"
                  Sequence="1000"&gt;
  
      &lt;UrlAction Url="~remoteAppUrl/../MyRemoteWebApp?" /&gt;
    &lt;/CustomAction&gt;
  
  &lt;/Elements&gt;
  </code></pre>
  
  <p>I can see 2 possible scenarios:</p>
  
  <p>1) My custom action definition is broken or is missing something I don't know about</p>
  
  <p>2) Custom actions on site action menus simply aren't possible for sharepoint apps through XML. <a href="http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2013/07/16/app-approaches-to-common-sharepoint-customizations.aspx" rel="nofollow">This blog</a> seems to suggest this is the case </p>
  
  <p>I mention the XML part because I have actually managed to add an element to the site action menu programatically. The problem is that, as far as I know, I lose the flexibility of the remoteAppUrl token being automatically replaced, along with other annoyances.</p>
  
  <p>So, what are your thoughts on the matter ? Did I miss something ? Can it be done with a purely XML-based definition ? What alternatives are there ?</p>