Not able to fetch token for tenant ID - Azure Analysis Service release pipeline deployment

Thamarai Selvan T 0 Reputation points
2023-09-18T16:41:13.34+00:00

Greetings!

I'm working on a Azure Analysis Service project. We have multiple models in there and we are maintaining our codes in Azure Devops Repos.

As of now, we are deploying our model to the server (both dev and production environment) manually through visual studio. Now we like to automate the deployment. So I searched for automation deployment through devops pipelines. Since we don't have any azure native plugin for the analysis service deployment, I went for an extension in marketplace and created an release pipeline with that.

For automation, I created an Service Principal for my project and used it as a Login Type. I configured the pipeline as per the requirement needed for the extension and created a release.

During the deployment, I ran into the following error.

System.Management.Automation.RunTimeException: Not able to fetch token for tenant Id my tenant id

I searched for solutions to resolve this but I couldn't find one. Please help me out to resolve this issue.

Things I tried out:

  1. Added the service principal to the owner role also in analysis service server
  2. Added the service principal to administrator role in my analysis service server
  3. Created a new secret for the service principal with validity for one year.

Thanks in advance.

Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
442 questions
{count} votes

1 answer

Sort by: Most helpful
  1. BhargavaGunnam-MSFT 28,076 Reputation points Microsoft Employee
    2023-09-20T19:29:57.8666667+00:00

    Hello Thamarai Selvan T,

    The error message "Not able to fetch token for tenant Id my tenant id" indicates the service principal may not have the necessary permissions to fetch an access token for the specified tenant ID.

    If you already have owner/admin role on the analysis service server, you shouldn't get the error message.

    Please check if the service principal exists on the Azure AD tenant in the same subscription.

    By default, the user that creates the server is automatically added as an Analysis Services server administrator

    https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-manage-users#user-permissionsUser's image

    0 comments No comments