none
My App for Office - task pane app doesn't get any ?et license token. What am I doing wrong? RRS feed

  • Question

  • My app is in dev stage, so license token should be 'hacked' into to app as per this document: http://msdn.microsoft.com/en-us/library/office/fp123519(v=office.15).aspx

    Now I did exactly what the document says, and I still don't get the GET parameter with the license token.

    What I did manage to get to work: 

    • office displays successfully in the task pane (it's a task pane app)
    • token file is read successfully - I set the license state to 'Trial', and Excel displays the little notification icon saying I'm using a trial version of the app. This means, that token is read. 

    I find the msdn description about the registry entry confusing. It says that the name of the reg key is arbitrary. Anyways, I created tons of registry entries in my registry with every possible combinations.
    No luck yet.

    Can someone help me out with an example or a working sample? 


    • Edited by Mihaly KR Tuesday, July 29, 2014 12:52 PM removed image
    Tuesday, July 29, 2014 12:51 PM

All replies

  • I'd like to store permanent settings for my task pane app per user on my server. This means, that I would like to make a request to my server sometime (for example to fooservice.com) with the client's Microsoft customer id, and connect that ID with an existing user account on my site.

    First of all, I'm not using Visual Studio, but decided to build the project with code editor (I wanted to get how it all works, and not using aids in the beginning)

    Getting the cid should be easy based on the apps for Office documentation, and let me cite the msdn page here:

    The Office application calling you app's URL would add the following query string to it and then pass the URL: http://fooservice.com/index.htm?et= PAByAD4APAB0ACAAYQBpAGQAPQ .... (->this string goes on for a while - Mihaly KR)

    The cid can be decoded from the token. That is of course when the app is already on Office Store. But I want to get this token while developing the app, so I can make sure everything would work flawless when released.

    MSDN has an answer to that too under http://bit.ly/1nMOS7Q , a page titled 'How to: Load a license token for testing purposes for task pane and content apps':

    1. create a manifest file (it's already created when I started the project, but whatevs)
    2. create a token file, same name as the manifest .xml, but with the extension of .tok, and the content provided there
    3. create a registry entry under HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Wef\Developer and the documentation's example looks like this: "entry1"="C:\\folder\\AppFile.xml". AppFile.xml should point to the manifest, but I'll cite what the MSDN docs say about it:

    Note that the name field, "entry1" and the .xml file name in this example are arbitrary.

    The use of the word arbitrary confuses me. I guess the entry value .xml should point to the manifest file. Key named Entry1 should be what then?

    I've tried everything, but nothing gets ever POSTed (or GETted), no ?etparameter.

    I did a php page which prints all get and post parameters, and set it as the APP source.

    My manifest file taskpaneapp.xml

    <?xml version="1.0" encoding="utf-8"?>
    <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:type="TaskPaneApp">
      <Id>08afd7fe-1631-42f4-84f1-5bc51e242f98</Id>
      <Version>1.0</Version>
      <ProviderName>Microsoft</ProviderName>
      <DefaultLocale>EN-US</DefaultLocale>
      <DisplayName DefaultValue="Get token"/>
      <Description DefaultValue="Test app for getting token"/>
      <IconUrl DefaultValue=
        "http://officeimg.vo.msecnd.net/_layouts/images/general/office_logo.jpg"/>
      <Capabilities>
        <Capability Name="Document"/>
        <Capability Name="Workbook"/>
      </Capabilities>
      <DefaultSettings>    
        <SourceLocation DefaultValue="http://taskpaneapp.misc.dev.nomo.hu/print_r.php"/>    
      </DefaultSettings>
      <Permissions>ReadWriteDocument</Permissions>
    </OfficeApp>
    

    My token file taskpaneapp.tok

    <r>
      <t 
        aid="WA900006056" 
        pid="{08afd7fe-1631-42f4-84f1-5bc51e242f98}" 
        cid="32F3E7FC559F4F49" 
        did="{0672BAE9-B41B-48FE-87F1-7F4D3DD3F3B1}" 
        ts="30" 
        et="Trial" 
        ad="2012-01-12T21:58:13Z" 
        ed="2012-06-30T21:58:13Z" 
        sd="2012-01-12T00:00:00Z" 
        te="2012-06-30T02:49:34Z" />
      <d>VNNAnf36IrkyUVZlihQJNdUUZl/YFEfJOeldWBtd3IM=</d>
    </r>
    

    MSDN docs are not consistent on the token file schema, some use {}s in pid and did some does not. I've tried both, none of them worked.

    my registry entry is:

    key: taskpaneapp
    value: \\NOMONAS\....\taskpaneapp.xml
    

    I tried

    key: entry1
    value: \\NOMONAS\.....\taskpaneapp.xml
    

    too, it didn't work.

    These file should be enough for testing licensing, and the app opens up in Word no problem, but never gets any parameters.

    Are the MSDN docs outdated? Don't think so, they were updated in Febr, 2014 and are said to be compatible with Office Apps JS API 1.0 and 1.1

    Anyone having the same issues?

    Please help me if you have any suggestions, or faced the same problems. Any suggestion would be greatly appreciated.


    Monday, July 28, 2014 12:04 PM
  • Hi Mihaly,

    I have reproduced this issue and am trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 30, 2014 5:23 AM
    Moderator