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

No Sensors #13

Closed
vcdx71 opened this issue Jan 22, 2024 · 6 comments
Closed

No Sensors #13

vcdx71 opened this issue Jan 22, 2024 · 6 comments

Comments

@vcdx71
Copy link

vcdx71 commented Jan 22, 2024

Just configured this, was able to authenticate to my account but no sensors show up. image

Am I supposed to add something to configuration.yaml

@geoffreylagaisse
Copy link
Owner

geoffreylagaisse commented Jan 22, 2024

Hi this should work without adding something in the configuration.yaml
Strangely enough I never could get the sensor naming correct. But you can update it later on.

Did you follow this part of the guide correctly?

In the left menu, select “API Permissions”
Click “Add a Permission”
Select “Microsoft Graph”
Select “Delegated Permissions”
Search for Presence.Read, expand “Presence” and select “Presence.Read”
Search for User.Read, expand “User” and select “User.Read”
Click the “Add permissions” button

If you did, are you using the business teams of the personal teams. The latter won't work.

@vcdx71
Copy link
Author

vcdx71 commented Jan 22, 2024

I did, see screenshot. It is business teams.

image

@geoffreylagaisse
Copy link
Owner

Can you check for error logs in the home assistant logging?
If there aren't any enable the debug logging and reload the integration. Then check the logging again.

@vcdx71
Copy link
Author

vcdx71 commented Jan 22, 2024

Debug log shows:

2024-01-22 15:32:16.419 ERROR (MainThread) [custom_components.microsoft_graph] Error requesting microsoft_graph data: 403, message='Forbidden', url=URL('https://graph.microsoft.com/beta/me/presence')
2024-01-22 15:32:16.420 DEBUG (MainThread) [custom_components.microsoft_graph] Finished fetching microsoft_graph data in 0.051 seconds (success: False)

@vcdx71
Copy link
Author

vcdx71 commented Jan 22, 2024

Seems Microsoft doesn't allow employees to consent so it doesn't work. Redeployed a new app registration and am getting the needs admin approval consent screen now.

@geoffreylagaisse
Copy link
Owner

So apparently a security option in your tenant.

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

No branches or pull requests

2 participants