Granting data access to groups or multiple users for Time Series Insights

Matt Turner 1 Reputation point Microsoft Employee
2020-06-15T19:41:16.767+00:00

I have a new Time Series Insights (Preview) environment and want to assign a reader data access role to all the members of our team. The only way I can find to do this is use the web portal and go through the multiple-step process for each individual. It's doable for 5 people but won't scale to 100 people, and will require manual maintenance of the list as team members join or leave. Is there a way to grant data access permissions to a group or do a bulk add?

Azure Time Series Insights
Azure Time Series Insights
An Azure internet of things (IoT) analytics platform to monitor, analyze, and visualize industrial IoT analytics data at scale.
78 questions
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,671 Reputation points Microsoft Employee
    2020-06-16T09:23:03.027+00:00

    Hi Matt,
    You can use Time Series Insights REST API .

    See: Access Policies - Overview

    Create or update an access policy in the specified environment. Example:

    PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.TimeSeriesInsights/environments/env1/accessPolicies/ap1?api-version=2018-08-15-preview  
    

    Request Body

    {  
      "properties": {  
        "principalObjectId": "aGuid",  
        "roles": [  
          "Reader"  
        ],  
        "description": "some description"  
      }  
    }  
    

    Also a similar question on StackOverflow for your reference: Scripting Azure Time Series Insights Data Access Policies


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.