Closed krishnareddyg closed 7 years ago
Please check the above issue and suggest me anything should be updated. I have given client id, username, password and domain name and execute script but it create app and added powerBI and Azure AD service and also selected permissions but while grant permission it's failing.
FYI: I am a global Admin in Azure Active directory and Contributor in Subscription.
The same code has been executed and failed but display name is Microsoft.Azure.ActiveDirectory for Windows Azure Active Directory and Microsoft.Azure.AnalysisServices for Power BI Service. So replace or else change the above code to AppDisplayName instead of DisplayName :).Hope it works.
Yes, it works for me, thanks Nagaraju!!!
Issue:
System.AggregateException occurred HResult=0x80131500 Message=One o r more errors occurred. Source=mscorlib StackTrace: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task
1.get_Result() at AzureAppRegUtility.Program.GetServicePrincipalId(String DisplayName) in C:\Users\User\Vijay\PowerBiEmbedded\AzureAppRegUtility\AzureAppRegUtility\Program.cs:line 139 at AzureAppRegUtility.Program.CreateApplicationForPowerBI(String AppDisplayName) in C:\Users\User\Vijay\PowerBiEmbedded\AzureAppRegUtility\AzureAppRegUtility\Program.cs:line 107 at AzureAppRegUtility.Program.Main(String[] args) in C:\Users\User\Vijay\PowerBiEmbedded\AzureAppRegUtility\AzureAppRegUtility\Program.cs:line 46Inner Exception 1: NullReferenceException: Object reference not set to an instance of an object.