Git Product home page Git Product logo

Comments (4)

cggarmendiaencamina avatar cggarmendiaencamina commented on July 17, 2024

I have the same problem when I try to perform the following steps to register and scan one or more Power BI tenants in Azure Purview in a cross-tenant scenario: https://docs.microsoft.com/en-us/azure/purview/register-scan-power-bi-tenant#register-and-scan-a-cross-tenant-power-bi. I'm stuck at step 12.

`
Set-AzDataCatalogSessionSettings : The type initializer for 'Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager' threw an exception.
At line:1 char:1

  • Set-AzDataCatalogSessionSettings -DataCatalogSession -TenantId $azure ...
  •   + CategoryInfo          : NotSpecified: (:) [Set-AzDataCatalogSessionSettings], TypeInitializationException
      + FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.DataCatalog.Management.Commands.SetSessionSettingsCmdlet
    
    

VERBOSE: Exception Details - System.Exception: Session is not initialized. Run 'Set-AzDataCatalogSessionSettings' cmdlet to initialize the session before running the Data Catalog cmdlets.
at Microsoft.DataCatalog.Management.Commands.DataCatalogCmdletBase.ProcessRecord()
Set-AzDataCatalogDataSource : Session is not initialized. Run 'Set-AzDataCatalogSessionSettings' cmdlet to initialize the session before running the Data Catalog cmdlets.
At line:3 char:1

  • Set-AzDataCatalogDataSource -Name 'pbidatasource' -AccountType PowerB ...
  •   + CategoryInfo          : NotSpecified: (:) [Set-AzDataCatalogDataSource], Exception
      + FullyQualifiedErrorId : System.Exception,Microsoft.DataCatalog.ManagedScan.DataSource.SetAzDataCatalogDataSource
    

`

from purview-samples.

tuterbatuhan avatar tuterbatuhan commented on July 17, 2024

Same issue here!

Running the code:

Set-AzDataCatalogSessionSettings -DataCatalogSession -ServicePrincipalAuthentication -TenantId $azuretenantId -ServicePrincipalApplicationId $ServicePrincipalId -ServicePrincipalKey $ServicePrincipalKey -DataCatalogAccountName $purviewaccount -Verbose

Received Error:

VERBOSE: Exception Details - System.TypeInitializationException: The type initializer for 'Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager' threw an exception. ---> System.ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array. at System.Collections.Generic.List1.Add(T item)
at Microsoft.DataCatalog.Management.Commands.Commands.IntegrationRuntimeClient..ctor()
at Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager..cctor()
--- End of inner exception stack trace ---
at Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager.ResetIntegrationRuntimeClient()
at Microsoft.DataCatalog.Management.Commands.SetSessionSettingsCmdlet.ExecuteCmdlet()
at Microsoft.DataCatalog.Management.Commands.DataCatalogCmdletBase.ProcessRecord()
Set-AzDataCatalogSessionSettings : The type initializer for 'Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager' threw an exception.
At line:1 char:1

  • Set-AzDataCatalogSessionSettings -DataCatalogSession -ServicePrincipa ...
  •   + CategoryInfo          : NotSpecified: (:) [Set-AzDataCatalogSessionSettings], TypeInitializationException
      + FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.DataCatalog.Management.Commands.SetSessionSettingsCmdlet`
    

from purview-samples.

ds-porini avatar ds-porini commented on July 17, 2024

Same issue also here!

Powershell command:
Set-AzDataCatalogSessionSettings -DataCatalogSession -TenantId $azuretenantId -ServicePrincipalAuthentication -ServicePrincipalApplicationId $ServicePrincipalId -ServicePrincipalKey $ServicePrincipalKey -DataCatalogAccountName $purviewaccount -verbose

Output:
VERBOSE: Exception Details - System.TypeInitializationException: The type initializer for
'Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager' threw an exception. --->
System.ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array.
at System.Collections.Generic.List`1.Add(T item)
at Microsoft.DataCatalog.Management.Commands.Commands.IntegrationRuntimeClient..ctor()
at Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager..cctor()
--- End of inner exception stack trace ---
at Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager.ResetIntegrationRuntimeClient()
at Microsoft.DataCatalog.Management.Commands.SetSessionSettingsCmdlet.ExecuteCmdlet()
at Microsoft.DataCatalog.Management.Commands.DataCatalogCmdletBase.ProcessRecord()
Set-AzDataCatalogSessionSettings : The type initializer for
'Microsoft.DataCatalog.Management.Commands.DataFactoryClientManager' threw an exception.
At line:1 char:1

  • Set-AzDataCatalogSessionSettings -DataCatalogSession -TenantId $azure ...
  •   + CategoryInfo          : NotSpecified: (:) [Set-AzDataCatalogSessionSettings], TypeInitializationException
      + FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.DataCatalog.Management.Commands.SetSessionSe
     ttingsCmdlet
    

from purview-samples.

tuterbatuhan avatar tuterbatuhan commented on July 17, 2024

I solved the problem. Please check your Service Principal's API permissions. It needs to have DELEGATED permissions. In my case, I had given Application permissions. See section 8.b in documentation for the details.

from purview-samples.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.