Hass-Microsoft-Graph icon indicating copy to clipboard operation
Hass-Microsoft-Graph copied to clipboard

No Sensors

Open vcdx71 opened this issue 1 year ago • 5 comments

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

vcdx71 avatar Jan 22 '24 20:01 vcdx71

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.

geoffreylagaisse avatar Jan 22 '24 20:01 geoffreylagaisse

I did, see screenshot. It is business teams.

image

vcdx71 avatar Jan 22 '24 20:01 vcdx71

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.

geoffreylagaisse avatar Jan 22 '24 21:01 geoffreylagaisse

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 avatar Jan 22 '24 21:01 vcdx71

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.

vcdx71 avatar Jan 22 '24 22:01 vcdx71

So apparently a security option in your tenant.

geoffreylagaisse avatar May 13 '24 09:05 geoffreylagaisse