Can't set a test license token in an Outlook addin

Viewed 118

I'm trying to set a test license token in an Outlook add-in. According to the documentation, I have to set it in the SourceLocation in the manifest file:

<Form xsi:type="ItemRead">
  <DesktopSettings>
    <SourceLocation DefaultValue="https://localhost:3000?et=%3Cr%3E%0A%20%20%3..."/>
    <RequestedHeight>250</RequestedHeight>
  </DesktopSettings>
</Form>

The problem is, when I try to get the URL query params, it won't work. window.location looks like this:

https://localhost:3000/?et=

Any idea why it's happening?

When I update the source location of the Action ShowTaskpane, it won't start the addin:

<Action xsi:type="ShowTaskpane">
    <SourceLocation resid="messageReadTaskPaneUrl" />
</Action>

...

<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:3000?et=%3Cr%3E%0A%20%20%...">

If I set it like this, when I start the addin, it says:

Sorry, but we can't start this add-in because it isn't set up properly.

I use the following test token:

<r>
  <t 
    aid="WA907006056" 
    pid="{4FB601F2-5469-4542-B9FC-B96345DC8B39}" 
    cid="32F3E7FC559F4F49" 
    did="{0672BAE9-B41B-48FE-87F1-7F4D3DD3F3B1}" 
    ts="30" 
    et="Trial" 
    ad="2012-01-12T21:58:13Z" 
    ed="2019-06-30T21:58:13Z" 
    sd="2012-01-12T00:00:00Z"
    test="true" 
    te="2019-06-30T02:49:34Z" />
  <d>VNNAnf36IrkyUVZlihQJNdUUZl/YFEfJOeldWBtd3IM=</d>
</r>

And use the following service to encode the url:

https://www.urlencoder.org/

1 Answers

The problem is with URL encoding. When encoding the token, you have to remove all the new lines. Otherwise, it will throw an error. So, before encoding, take the token...

<r>
  <t 
    aid="WA907006056" 
    pid="{4FB601F2-5469-4542-B9FC-B96345DC8B39}" 
    cid="32F3E7FC559F4F49" 
    did="{0672BAE9-B41B-48FE-87F1-7F4D3DD3F3B1}" 
    ts="30" 
    et="Trial" 
    ad="2012-01-12T21:58:13Z" 
    ed="2019-06-30T21:58:13Z" 
    sd="2012-01-12T00:00:00Z"
    test="true" 
    te="2019-06-30T02:49:34Z" />
  <d>VNNAnf36IrkyUVZlihQJNdUUZl/YFEfJOeldWBtd3IM=</d>
</r>

and remove all the new lines like this:

<r> <t aid="WA907006056" pid="{4FB601F2-5469-4542-B9FC-B96345DC8B39}" cid="32F3E7FC559F4F49" did="{0672BAE9-B41B-48FE-87F1-7F4D3DD3F3B1}" ts="30" et="Trial" ad="2012-01-12T21:58:13Z" ed="2019-06-30T21:58:13Z" sd="2012-01-12T00:00:00Z" test="true" te="2019-06-30T02:49:34Z" /> <d>VNNAnf36IrkyUVZlihQJNdUUZl/YFEfJOeldWBtd3IM=</d> </r>

Finally encode it and add to all the source locations.

Related