Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to use Connect-PowerBIServiceAccount with AAD Token directly? #398

Open
RobinLin666 opened this issue Oct 19, 2023 · 2 comments
Open

Comments

@RobinLin666
Copy link

I want to use Connect-PowerBIServiceAccount API in Fabric Notebook,
I only have AAD token, how to Connect-PowerBIServiceAccount? (I can use pwsh in notebook)
image

@RobinLin666 RobinLin666 changed the title How to use Connect-PowerBIServiceAccount with AAD Token in Fabric Notebook? How to use Connect-PowerBIServiceAccount with AAD Token directly? Nov 7, 2023
@philosophicles
Copy link

@RobinLin666 I'm just a fellow user, and I haven't actually tried this, but it looks to me like you just need to build your token into a PSCredential object then pass it to Connect-PowerBIServiceAccount using the -Credential option.

https://learn.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.profile/connect-powerbiserviceaccount?view=powerbi-ps#example-3

@RobinLin666
Copy link
Author

@RobinLin666 I'm just a fellow user, and I haven't actually tried this, but it looks to me like you just need to build your token into a PSCredential object then pass it to Connect-PowerBIServiceAccount using the -Credential option.

https://learn.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.profile/connect-powerbiserviceaccount?view=powerbi-ps#example-3

image Yes, But I don't want to pass the username (your AAD client ID) and password (your application secret key), I want to use my exsit AAD token to auth.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants