M365-DenzilFernandes / PowerBI-MessageCenter

Connecting Power BI to Microsoft 365 Message Center
10 stars 0 forks source link

Not able to get O365 token - We couldn't authenticate with the credentials providede #5

Closed LakurCz closed 1 year ago

LakurCz commented 1 year ago

Hello Denzil, I'm from Microsoft PACE team and one of our client's raised a question that he is not able to setup the dashboard. I tried to repro the issue or make it work but unfortunately it doesn't work for me either. We are just not able to get the token.

When I Create an app in azure.portal.com/ grant all the necessary permissions (Service.Health + Service.Message) which is needed. image

Then I'm rewriting the tenant ID + Client ID + Secret key in your pbix file as described image

I just can't authenticate myself image

We are trying the Option1 and downloading the pbix from the App registration part - https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter#azure-ad-app-registration This one https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter/raw/main/Microsoft365AdminCenter-MessageCenter-Public.pbix

I'm posting this issue on behalf of the client.

If can help us solve this problem, it will be awesome!

Thanks, Daniel

M365-DenzilFernandes commented 1 year ago

Thanks for explaining the issue. Can you please try this pbix file instead... https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter/blob/main/Microsoft365AdminCenter-MessageCenter-Public-v3.0.pbix

LakurCz commented 1 year ago

Thanks for your answer but unfortunately with this link (pbix) -https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter/raw/main/Microsoft365AdminCenter-MessageCenter-Public-v3.0-Direct.pbix Its the same thing image image

TenantID/ClientID: image Secret: image

LakurCz commented 1 year ago

Oh I see now, you provided link with the sharepoint - https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter/raw/main/Microsoft365AdminCenter-MessageCenter-Public-v3.0.pbix

As Client is not able to use Automate Flows in his company, we can't implement Options 2 :(

M365-DenzilFernandes commented 1 year ago

There are two solutions. I am providing assistance to Option 1. This uses a direct query from PBI to the tenant's message center and doesn't require Power Automate.

In this report, when you edit the transform, all connections use "Anonymous". There is no authentication here. Instead, the authentication is happening inside the query which contains the values you have updated or replaced.

Can you start over using the link for the report I provided? https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter/raw/main/Microsoft365AdminCenter-MessageCenter-Public-v3.0.pbix

image

image

LakurCz commented 1 year ago

Hello Denzil, the link which you provided https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter/raw/main/Microsoft365AdminCenter-MessageCenter-Public-v3.0.pbix redirect me to file which is using sharepoint and there is no any graph.microsoft.com inside of the DataSource Settings.

This is what I can see in that file you shared image

If you sent a wrong one and it should be the this one https://github.com/M365-DenzilFernandes/PowerBI-MessageCenter/raw/main/Microsoft365AdminCenter-MessageCenter-Public-v3.0-Direct.pbix with the "ending" direct. I tested that and I'm still getting authentication error. Once I change the values of tenantID, objectID, secretID PBI wants from me to authenticate and I'm not able to do that. Before that I changed every connection to Anonymous and it didn't help image

Thanks for helping.

M365-DenzilFernandes commented 1 year ago

Correct on the PBIX file, we need to use the direct query. Sorry idky when I paste links its not giving you the right file.

Notice on this data source when I edit it.. Using anonymous on the login,microsoftonline.com link I don't see a drop down. I saw that in your client you had a URL there *your 1st post screenshot.

image

My PBI Desktop version is , try to see if you have something equivalent or newer as well. image

LakurCz commented 1 year ago

I'm trying to do the same steps but always I get to the Access Web Content Windows and get the error . image

I have here a short video - How I'm, trying to setup the dashboard - https://microsofteur-my.sharepoint.com/:v:/g/personal/v-dhaborak_microsoft_com/EUZkMYhzG51Inuen_vDi-OoBpXFgUD5-PWnQuMIObPjOWA?e=N1hMsd (hope you can access it)

If I discard changes, the O365 token get updated with these tenantID/clientID/client_secret. I don't know where they are from. image

M365-DenzilFernandes commented 1 year ago

Thanks for the video. I saw that you clicked "Clear Permission" just before setting up the report. Can you bypass that step? The report I have uploaded/saved has that already configured.

LakurCz commented 1 year ago

No worries. I skipped the step but its the same thing :( . Have a look https://microsofteur-my.sharepoint.com/:v:/g/personal/v-dhaborak_microsoft_com/ERRX1oZi_whLlsE5jEKzWfQB7C9yM2zL0Jk2yYbg08_kDA?e=eg8khv. Or drop me your email if you are willing to have a call about that.

Have a look what happened after Discard Changes, thats very strange. Thanks

M365-DenzilFernandes commented 1 year ago

The issue was related to the secret. Used Secret ID vs Value