Share via


Permission or URL issue when you use Azure Digital Twin explorer for the 1st time

This article is about permission or URL issue when you use Azure Digital Twin explorer for the 1st time. I had to spend a lot of time trying to fix this issue so hope this helps you 
https://itfreesupport.com/wp-content/uploads/2023/02/twin1.pngWhen you open digital twin for the 1st time, you will have to provide the Azure digital twins URL.https://itfreesupport.com/wp-content/uploads/2023/02/twin2.pngThis is the URL from your Digital Twin Overview screen in front of Hostname as shown below, make sure you start with https://https://itfreesupport.com/wp-content/uploads/2023/02/twin3.pngIf you get below error or any permission error try below steps to resolve the issue
Error : ‘Double check URL and directory’ or ‘you don’t have permission on the Digital twin URL’
RestError: Sub-domain not found.
    at new t (https://explorer.digitaltwins.azure.net/static/js/465.196a83e5.chunk.js:2:21103219)
    at https://explorer.digitaltwins.azure.net/static/js/465.196a83e5.chunk.js:2:21108505
    at https://explorer.digitaltwins.azure.net/static/js/465.196a83e5.chunk.js:2:21109190

To resolved these errors follow below steps

  • In the Azure portal, navigate to the Digital Twins resource
  • Make sure you use the URL given on your Digital Twin Overview screen in front of Hostname as shown above, make sure you start with https://
  • Also give appropriate permission to yourself by clicking on the Access Control (IAM) menu
  • Select Add role assignment
  • Select Azure Digital Twins Data Owner in the Role dropdown listbox
  • For the Assign access to setting, select User, group, or service principal
  • Now, select the user that you are using in the Azure portal right now and that you’ll use on your local machine to authenticate with the sample application
  • Click Save to assign the Role

https://itfreesupport.com/wp-content/uploads/2023/02/twin4.pnghttps://itfreesupport.com/wp-content/uploads/2023/02/twin5.pnghttps://itfreesupport.com/wp-content/uploads/2023/02/twin6.pnghttps://itfreesupport.com/wp-content/uploads/2023/02/twin7.png

Reference : https://itfreesupport.com/2023/02/permission-or-url-or-with-azure-digital-on-azure-digital-twin-explorer/