Exemplo n.º 1
0
        public async Task <bool> CreatePowerBiGroup(GroupCreateRequestVM groupCreateRequest)
        {
            var request = new GroupCreateRequest {
                Credential = new UserData
                {
                    TenantId      = groupCreateRequest.Credential.TenantId,
                    SecretId      = groupCreateRequest.Credential.SecretId,
                    ApplicationId = groupCreateRequest.Credential.ApplicationId
                },
                GroupName = groupCreateRequest.GroupName,
                Members   = groupCreateRequest.Members.Select(s =>
                {
                    var membersRights = new MembersRights
                    {
                        MemberEmail          = s.MemberEmail,
                        GroupUserAccessRight = s.GroupUserAccessRight
                    };
                    return(membersRights);
                }).ToArray()
            };
            var Result = await _powerService.CreateGroup(request);

            return(Result);
        }