feat: a Fields pane for anything but a secret, first for Azure accounts: fields and groups to move through, filter and copy #7
@@ -204,11 +204,11 @@ func (p *Provider) Groups(ctx context.Context) ([]string, error) {
|
|||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
switch {
|
switch {
|
||||||
case err != nil:
|
case err != nil:
|
||||||
return nil, fmt.Errorf("Microsoft Graph: %w", err)
|
return nil, fmt.Errorf("listing groups from Microsoft Graph: %w", err)
|
||||||
case page.Error != nil:
|
case page.Error != nil:
|
||||||
return nil, fmt.Errorf("Microsoft Graph: %s", page.Error.Message)
|
return nil, fmt.Errorf("listing groups from Microsoft Graph: %s", page.Error.Message)
|
||||||
case resp.StatusCode != http.StatusOK:
|
case resp.StatusCode != http.StatusOK:
|
||||||
return nil, fmt.Errorf("Microsoft Graph: %s", resp.Status)
|
return nil, fmt.Errorf("listing groups from Microsoft Graph: %s", resp.Status)
|
||||||
}
|
}
|
||||||
for _, v := range page.Value {
|
for _, v := range page.Value {
|
||||||
if v.Type == "#microsoft.graph.group" && v.Name != "" {
|
if v.Type == "#microsoft.graph.group" && v.Name != "" {
|
||||||
|
|||||||
Reference in new issue
Block a user