0

I setup a while ago an Azure Immersive Reader SDK for use in an ASP.Net MVC application (4.5) using the Microsoft Learn tutorials. This all worked fine but now have an issue where the token is always expired (after months of use weirdly).

On further debugging I found the accesstoken returned to have an expireson that was perfectly valid (60 mins). Yet the immersive reader SDK returns this: IR Output

I have confirmed the token and subdomain is correct before ImmersiveReader.LaunchAsync(tkn,subdomain,data,options) fires. It loads the frame and start of immersive reader still but getting that message. At this point hard to debug as using the Microsoft library from that point: https://contentstorage.onenote.office.net/onenoteltir/immersivereadersdk/immersive-reader-sdk.1.0.0.js

Irma Nohere
  • 35
  • 2
  • 6

1 Answers1

0

I'm Ryan from the Immersive Reader team here. The issue may be something other than expired token. Looks like our code returns Expired on any 401 response returned from our service, whether it is actually expired or perhaps something else.

I suggest you post a new issue on our github repo here - https://github.com/microsoft/immersive-reader-sdk/issues

I can work 1:1 with you on debugging this and we can report our findings back here.

Thanks!

  • Hi Ryan, before I do that, I tested with an example which worked then added my Tenant, Client, Secret, Subdomain etc to and still got the same message. Could you confirm where these should come from so I can double check against Azure? – Irma Nohere Nov 10 '22 at 08:51
  • Our reference for this can be found at https://learn.microsoft.com/azure/applied-ai-services/immersive-reader/how-to-create-immersive-reader The script here will help you create your Immersive Reader resource, create an Azure Active Directory Application, and assign permissions for that application to access your IR resource. You can then use the json output of that script which contains these values, and set it as the secrets on our sample projects, like this one - https://github.com/microsoft/immersive-reader-sdk/tree/dev/js/samples/quickstart-csharp – Ryan Waller Nov 10 '22 at 15:14
  • The TenantId is the from the Azure AD tenant created in your subscription. Navigate to to Azure Active Directory and check the Tenant ID on the main landing page. The ClientId is your Azure AD Application (Client) Id. You can find your application under the App Registrations blade in the Azure Active Directory section. The ClientSecret is the password you created on your AD Application. You can check it from the Certificates and Secrets blade after navigating to your Application. The Subdomain can be seen on the Keys and Endpoint blade for your IR resource, under the Endpoint field. – Ryan Waller Nov 10 '22 at 15:26
  • Ok thats all correct then, I'll raise on github – Irma Nohere Nov 10 '22 at 16:04