Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[CoE Starter Kit - BUG] Office 365 Management API error #4929

Closed
RemzoA opened this issue Mar 8, 2023 · 5 comments
Closed

[CoE Starter Kit - BUG] Office 365 Management API error #4929

RemzoA opened this issue Mar 8, 2023 · 5 comments
Assignees
Labels
coe-starter-kit CoE Starter Kit issues question Further information is requested

Comments

@RemzoA
Copy link

RemzoA commented Mar 8, 2023

Describe the issue

Hi.

After updating to the latest version of the CoE kit, I am now not able to get the audit logs using the Custom Connector.
When I have updated the CC with the correct information, and then run a "StartSubscription" test, I`m getting the following message:

Operation failed (401), see response below:
Status:
(401)
Headers:
{
"cache-control": "no-cache",
"content-length": "61",
"content-type": "application/json; charset=utf-8",
"date": "Wed, 08 Mar 2023 07:18:41 GMT",
"expires": "-1",
"pragma": "no-cache",
"www-authenticate": "Bearer error="invalid_token"",
"x-aspnet-version": "4.0.30319",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "false",
"x-powered-by": "ASP.NET"
}
Body:
{
"Message": "Authorization has been denied for this request."
}

I have the App reg set up with API Permissions as following:

Microsoft Graph:
User.Read - Type: Deleaged - Status: Granted
Office 365 Management APIs
ActivityFeed.Read - Type: Delegated - Status: Granted
ActivityFeed.Read - Type: Application - Status: Granted
ServiceHealth.Read - Type: Delegated - Status: Granted
ServiceHealth.Read - Type: Application - Status: Granted
PowerApps RunTime Service
user_impersonation - Type: Delegated - Status: Granted

Client secret is not expired.

I have the Power Platform Admin role, and it`s active.

When the Child Admin | Sync Logs flow is running, it gets to the action: "List audit log content" where it gets an error saying "Authorization has been denied for this request".

This was working yesterday before I updated to the newest version.

Expected Behavior

Expected is to be able to gather Audit Log data.

What solution are you experiencing the issue with?

Audit Log

What solution version are you using?

3.3

What app or flow are you having the issue with?

Child - Admin - Sync Logs

Steps To Reproduce

No response

Anything else?

No response

@RemzoA RemzoA added bug Something isn't working coe-starter-kit CoE Starter Kit issues labels Mar 8, 2023
@manuelap-msft
Copy link
Contributor

Hello. Connections to custom connectors get broken on solution upgrade. Please see issue 1424 for how to resolve

Note also that there was a recent product change in which the default identity provider for setting up a custom connector has changed from Azure Active Directory to Generic Oauth2. Please see #4808 for our bug to update the documentation about this next release.

@manuelap-msft manuelap-msft added question Further information is requested and removed bug Something isn't working labels Mar 8, 2023
@RemzoA
Copy link
Author

RemzoA commented Mar 9, 2023

Hi.
Thanks for the info.
I have done everything that was stated in the information, but it still did not work for me. I was still getting an error on the connection to the Custom Connector from the Child Flow, and still when I did a test of the Custom Connector, I`m got the error message. "Authorization has been denied for this request".

I also tried to delete the Audit Log solution and import it again, but still same got issue.

But, I noticed that in the setup of the Custom Connector, there is a field named "Enable on-behalf-of-login", and that the value of this was set to "false", as it is in all the pictures in all of the information.
Just out of curiosity, I changed this to "true", tested, and it worked. Not sure why, but if I change it back to "false", it stops working.
image

In addition, I have to say that this us extremely frustrating. Every time there is a new version of the CoE kit, something goes wrong, and this leads me to ask the question, how well are the new versions tested before they are launched?

@manuelap-msft
Copy link
Contributor

Glad you got this working, and thanks for letting us know what you did to get it working - that will help us help other customers.

Unfortunately product changes like the one that happened with custom connectors, where both the default provider as well as some of the required fields to configure authentication changed, are out of our control. We tested the release and component before go live, and about a week after the release of this version the custom connector interface itself changed. This change was not related to the CoE kit, and would have impacted any custom connector you're configuring. The platform evolves all the time, and sometimes we have to play a little catch up.

@Jenefer-Monroe
Copy link
Collaborator

I did a full write up for this situation since so many people are hitting it. Please see issue 4961

@Jenefer-Monroe
Copy link
Collaborator

closing out as no further action for starter kit team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coe-starter-kit CoE Starter Kit issues question Further information is requested
Projects
Archived in project
Development

No branches or pull requests

3 participants