maikvandergaag / msft-extensions

Repository for extensions mainly used for Azure DevOps Extensions
https://msftplayground.com
MIT License
126 stars 81 forks source link

String encryption issue - PowerBI Actions #434

Closed Chetan8595 closed 1 year ago

Chetan8595 commented 1 year ago

Description:

We're facing an issue while using an extension (PowerBI Actions) for the CI/CD in which, for two specific Workspaces ("Unifi Station Analytics - UAT" and "Unifi Station Analytics"), the pipeline doesn't recognise the workspace names as it seems to be encrypting half of the string (the workspace name "Unifi Station Analytics -UAT" will transform into "***-UAT"). Could you please provide a possible solution?

PowerBI Extension

maikvandergaag commented 1 year ago

Do you have logs

Chetan8595 commented 1 year ago

Hello,

Could you please provide an update on this if any?

Best Regards, Chetan

On Mon, 29 Aug, 2022, 3:39 pm Chetan J, @.***> wrote:

Hello,

Due to organizational restrictions, i will not be able to share the logs with you but I have provided the workspaces names. However, the error says: "workspace ***-UAT doesn't exist". We could surely connect over a quick call if required.

Best Regards, Chetan

On Mon, 29 Aug, 2022, 3:13 pm Maik van der Gaag, @.***> wrote:

Do you have logs

— Reply to this email directly, view it on GitHub https://github.com/maikvandergaag/msft-extensions/issues/434#issuecomment-1230031682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPWKWFDAXGU6TN5UHUEIMDV3SA33ANCNFSM5742P52Q . You are receiving this because you authored the thread.Message ID: @.***>

maikvandergaag commented 1 year ago

Could you share logs of the run?

Chetan8595 commented 1 year ago

PFA the logs IMG_20220905_131047__02 IMG_20220905_132159__01

for the Power BI Action: Publish task which is failed for the powerbi workspace (Unifi Station Analytics - UAT) .

Please let me know if you need any further information on this issue.

Chetan8595 commented 1 year ago

Hi maik,

Any update on this issue?

Best regards, Chetan

Chetan8595 commented 1 year ago

Hello @maikvandergaag , I have already shared the run logs for the PowerBI Actions task. Could you please look into the issue, we can quickly connect on call for a review if required.

Best regards, Chetan

maikvandergaag commented 1 year ago

@Chetan8595 If the workspace can not be found this could be caused by two things:

For the first one we made a fix a year ago, so the best guess is that it is option two please check all the permissions.

Chetan8595 commented 1 year ago

Hi @maikvandergaag ,

We confirm that we have the permissions to access the workspaces (Unifi Station Analytics - UAT and Unifi Station Analytics) after validation with the help of the command reference: https://docs.microsoft.com/en-us/rest/api/power-bi/groups/get-groups After this confirmation, we suspect that the encoding issue could be still be persistent. Could you please provide more inputs on this.

Best regards, Chetan

maikvandergaag commented 1 year ago

Oke,

Could you:

That way I'm able to check the process. Next time please use the template of the issue because we are lacking info for a good investigation.

Chetan8595 commented 1 year ago

Oke,

Could you:

  • Supply the logs in a txt file reference
  • Tell me how you tested the API
  • Tell me the security method used
  • Version of the extension

That way I'm able to check the process. Next time please use the template of the issue because we are lacking info for a good investigation.

@maikvandergaag ,

  • Supply the logs in a txt file reference: PowerBI_Actions_Error_log.txt
  • Tell me how you tested the API: Here's a quick way for us to double-check how Power BI is reading the Workspace names directly, so we know if the issue is related with the Extension or with the PBI Service as a whole. Could you go to this page (Groups - Get Groups - REST API (Power BI Power BI REST APIs) | Microsoft Docs) and click on the Try-It button? This is an API that will list all the Workspaces that you have access to. When signing-in, let us use the same PBI account that you use on PBI Service. Afterwards, click directly on Run. You should get a 200 result on the Response and see the Workspaces listed there on the Body. We see the Unifi Station Analytics and Unifi Station Analytics - UAT workspaces listed there. RESTAPI_Test_logs.txt
  • Tell me the security method used: We have used the Service Principal authentication to PowerBI service
  • Version of the extension: PowerBi Actions: 5.4.39

Let me know if any more info required.

maikvandergaag commented 1 year ago

Oke thanks,

One point if you are using Service Principal Authentication. It can be due to the access rights of the SPN.

It is great that you have tested it our via docs but that is done by a user. The authorization can be very different for a spn.

Chetan8595 commented 1 year ago

Oke thanks,

One point if you are using Service Principal Authentication. It can be due to the access rights of the SPN.

It is great that you have tested it our via docs but that is done by a user. The authorization can be very different for a spn.

@maikvandergaag , For the mentioned workspaces, i have the admin level access and we have the success case logs for a different workspace as in the attached success logs. PowerBI_Actions_Success_Case.txt

However, the PowerBI workspaces and ADO pipelines were reviewed by Microsoft team and confirmed the configurations to be fine from the respective services. So could you help us with a workaround for this if any.

maikvandergaag commented 1 year ago

Will check naming looks fine on the side of the extension.

Could you share screenshots of the configuration and the access rights on the workspace

Chetan8595 commented 1 year ago

Will check naming looks fine on the side of the extension.

Could you share screenshots of the configuration and the access rights on the workspace

@maikvandergaag , Attached are the screenshots for the ADO configuration and Access grant in PowerBi. PowerBI_Actions_Config PowerBI_Workspace_Access

We could surely connect for a few minutes call if required as per your convinience.

Best regards, Chetan

maikvandergaag commented 1 year ago

Thanks is that the only user in de access grant?

And could you maybe share the export from the api.

You can also share things via email if you do not want to place them here

Chetan8595 commented 1 year ago

Thanks is that the only user in de access grant?

And could you maybe share the export from the api.

You can also share things via email if you do not want to place them here

@maikvandergaag , There are many other users too as part of the workspace. I will share via email to you on export details.

Chetan8595 commented 1 year ago

Thanks is that the only user in de access grant?

And could you maybe share the export from the api.

You can also share things via email if you do not want to place them here

@maikvandergaag , If I get you right, "export from api" - https://api.powerbi.com/v1.0/myorg/groups When we run this RESTAPI , we sign in with the respective service account login to the powerbi and able to see the workspace details in the json.

maikvandergaag commented 1 year ago

Yes

Chetan8595 commented 1 year ago

Yes

@maikvandergaag , We have validated even that and it seems to be the access is absolutely fine.

Chetan8595 commented 1 year ago

Yes

@maikvandergaag , We have validated even that and it seems to be the access is absolutely fine.

@maikvandergaag , I have already shared you those details as part of the RESTAPI_test_logs.txt . It shows the details

Chetan8595 commented 1 year ago

Yes

@maikvandergaag , We have validated even that and it seems to be the access is absolutely fine.

@maikvandergaag , I have already shared you those details as part of the RESTAPI_test_logs.txt . It shows the details

@maikvandergaag , Any update on this??

maikvandergaag commented 1 year ago

Yes but would like to see a validated log with the Service Principal that you are using with the extension.

Chetan8595 commented 1 year ago

Yes but would like to see a validated log with the Service Principal that you are using with the extension.

@maikvandergaag , Am not sure what you meant by "validated log with the Service Principal". However, in the attached success case and the failure case logs we have the service principal authentication successful. We could surely schedule a quick call and close on this if possible. Let me know your best time, so as to send you an invite for the same.

Best Regards, Chetan

maikvandergaag commented 1 year ago

My availability is terrible could you just send me a time slot when you have time?

Chetan8595 commented 1 year ago

My availability is terrible could you just send me a time slot when you have time?

@maikvandergaag , I have sent a teams meeting to your email, could you please accept the invite, else please suggest a suitable timeline.

Best Regards, Chetan

Chetan8595 commented 1 year ago

My availability is terrible could you just send me a time slot when you have time?

@maikvandergaag , I have sent a teams meeting to your email, could you please accept the invite, else please suggest a suitable timeline.

Best Regards, Chetan

@maikvandergaag , Could you please join the call on the teams invite which i sent you?

maikvandergaag commented 1 year ago

@Chetan8595 Sorry was away with my family. We can schedule something for Wednesday. What timezone are you in?

Just tested the extension with the same naming and it works correctly so the encoding will not be the issue. I think you are missing some configurations arround the SPN that why I asked to call the API with the SPN.

Chetan8595 commented 1 year ago

@Chetan8595 Sorry was away with my family. We can schedule something for Wednesday. What timezone are you in?

Just tested the extension with the same naming and it works correctly so the encoding will not be the issue. I think you are missing some configurations arround the SPN that why I asked to call the API with the SPN.

@maikvandergaag , Sure, i will setup a call around 2pm IST On Wednesday. Thanks for the test result, could you please share me the logs if possible for PowerBI actions task if possible, may be I could compare with my error logs and try to fix the configuration issues if any.

Best regards, Chetan

maikvandergaag commented 1 year ago

off course: 3_Power BI Action Publish.log

Chetan8595 commented 1 year ago

off course: 3_Power BI Action Publish.log

@maikvandergaag , Thanks for the log, but as per my observation the string name is different in the logs as "Unify Station Analytics - UAT", But this string is supposed to be " Unifi Station Analytics - UAT" right?

Best regards, Chetan

maikvandergaag commented 1 year ago

Is it correct that you have a space in front of your name?

Chetan8595 commented 1 year ago

Is it correct that you have a space in front of your name?

@maikvandergaag , This is the exact string we could try on : 'Unifi Station Analytics - UAT'. Best regards, Chetan

Chetan8595 commented 1 year ago

Is it correct that you have a space in front of your name?

@maikvandergaag , This is the exact string we could try on : 'Unifi Station Analytics - UAT'. Best regards, Chetan

@maikvandergaag , This part of the log I was referring to: 2022-09-17T06:30:31.9719158Z ##[debug]INPUT_WORKSPACENAME: 'Unify Station Analytics - UAT'

Chetan8595 commented 1 year ago

Is it correct that you have a space in front of your name?

@maikvandergaag , This is the exact string we could try on : 'Unifi Station Analytics - UAT'. Best regards, Chetan

@maikvandergaag , This part of the log I was referring to: 2022-09-17T06:30:31.9719158Z ##[debug]INPUT_WORKSPACENAME: 'Unify Station Analytics - UAT'

@maikvandergaag , Did you get a chance to try with the right string name?

maikvandergaag commented 1 year ago

Yes that also worked

Chetan8595 commented 1 year ago

Yes that also worked

@maikvandergaag , Could you please share the logs for the same, We could discuss more on this in Wednesday (2pm IST) Call.

Best regards, Chetan

Chetan8595 commented 1 year ago

Yes that also worked

@maikvandergaag , Could you please share the logs for the same, We could discuss more on this in Wednesday (2pm IST) Call.

Best regards, Chetan

@maikvandergaag , Hope this timeline is ok for you.

maikvandergaag commented 1 year ago

Not able to share logs at this moment time is fine

Chetan8595 commented 1 year ago

Not able to share logs at this moment time is fine

@maikvandergaag , Sure, let me send you the updated invite.

Chetan8595 commented 1 year ago

Not able to share logs at this moment time is fine

@maikvandergaag , Sure, let me send you the updated invite.

@maikvandergaag ,

Could you please join the teams call?

Chetan8595 commented 1 year ago

Not able to share logs at this moment time is fine

@maikvandergaag , Sure, let me send you the updated invite.

@maikvandergaag ,

Could you please join the teams call?

@maikvandergaag ,

maikvandergaag commented 1 year ago

Solution was to add the SPN to the users of the workspace

Chetan8595 commented 1 year ago

Hello,

Due to organizational restrictions, i will not be able to share the logs with you but I have provided the workspaces names. However, the error says: "workspace ***-UAT doesn't exist". We could surely connect over a quick call if required.

Best Regards, Chetan

On Mon, 29 Aug, 2022, 3:13 pm Maik van der Gaag, @.***> wrote:

Do you have logs

— Reply to this email directly, view it on GitHub https://github.com/maikvandergaag/msft-extensions/issues/434#issuecomment-1230031682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPWKWFDAXGU6TN5UHUEIMDV3SA33ANCNFSM5742P52Q . You are receiving this because you authored the thread.Message ID: @.***>