Azure / iot-workshop-asset-tracking

End-to-end IoT workshop focusing on a real-time asset tracking scenario.
https://aka.ms/iot-workshop-asset-tracking
Creative Commons Attribution 4.0 International
49 stars 20 forks source link

Time Series Data not visualized during step004 #4

Open GlennColpaert opened 4 years ago

GlennColpaert commented 4 years ago

Description When finalizing the map visualization and running the test application no data is being displayed. The reason for this is that the current implementation is unable to find the correct Time Series instance. This is probably related due to the fact that in the current implementation no specific AAD is specified.

404 Resource Not Found

Fix

Change the following implementation inside webapp/auth.js

authContext = new AuthenticationContext(authContextProperties);

to

authContext = new AuthenticationContext({
        authContextProperties, 
        cacheLocation: 'localStorage',
        tenant: '<your tenant ID>',
        clientId: '120d688d-1518-4cf7-bd38-182f158850b6'
    });

This implementation adds the specific tenantID and the clientID to the AuthenticationContext. After this implementation make sure to a proper logout and log in as I noticed that in some cases the AuthenticationContext is cached, might be browser-related!