Skip to content

Commit

Permalink
fix!: getUserPresence should only request presence.read (#2813)
Browse files Browse the repository at this point in the history
pivots to use presence.read instead of presence.read.all when getting presence for users other than the current user.

BREAKING CHANGE: applications which have previously requested presence.read.all and not presence.read will have a changed set of required scopes. This will require additional user consent or updating of pre-consented permissions when incremental consent is not enabled
  • Loading branch information
gavinbarron authored Oct 31, 2023
1 parent f5bf7cc commit 14e7a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mgt-components/src/graph/graph.presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const getUserPresence = async (graph: IGraph, userId?: string): Promise<P
}
}

const scopes = userId ? ['presence.read.all'] : ['presence.read'];
const scopes = ['presence.read'];
const resource = userId ? `/users/${userId}/presence` : '/me/presence';

const result = (await graph
Expand Down

0 comments on commit 14e7a56

Please sign in to comment.