I've been trying to get a list of all my plans within an Office 365 group. I've tried using various methods of authentication using client ID and secret with the proper group permissions, login credentials and others. No matter what I try, I'm getting 401 or 403 errors. Does anyone have a sample that shows how they authenticate to Office 365, get a list of Office 365 Groups and the Plans for each Group?
To work with groups and plans, you should have acquired your access token with the permission "Group.ReadWrite.All" (or Group.Read.All).
And most importantly, you should be a member of the group to list plans of the group. You will get 403 (Forbidden) error, if you try to get plans and its data without being a member of the plan's associated group even if you have global admin privilege and the token with Group.ReadWrite.All permission.
So please ensure that the user has been added as member of the group and the acquired token has "Group.ReadWrite.All" (or Group.Read.All) permission.