diff --git a/providers/ms365/resources/conditional-access.go b/providers/ms365/resources/conditional-access.go index 9a5389396d..773f4d2c74 100644 --- a/providers/ms365/resources/conditional-access.go +++ b/providers/ms365/resources/conditional-access.go @@ -11,6 +11,10 @@ import ( "go.mondoo.com/cnquery/v11/providers/ms365/connection" ) +func (m *mqlMicrosoftConditionalAccessIpNamedLocation) id() (string, error) { + return m.Name.Data, nil +} + func (a *mqlMicrosoftConditionalAccess) namedLocations() ([]interface{}, error) { conn := a.MqlRuntime.Connection.(*connection.Ms365Connection) graphClient, err := conn.GraphClient() diff --git a/providers/ms365/resources/ms365.lr.go b/providers/ms365/resources/ms365.lr.go index 97b809e020..d0d7f8b45c 100644 --- a/providers/ms365/resources/ms365.lr.go +++ b/providers/ms365/resources/ms365.lr.go @@ -2926,7 +2926,12 @@ func createMicrosoftConditionalAccessIpNamedLocation(runtime *plugin.Runtime, ar return res, err } - // to override __id implement: id() (string, error) + if res.__id == "" { + res.__id, err = res.id() + if err != nil { + return nil, err + } + } if runtime.HasRecording { args, err = runtime.ResourceFromRecording("microsoft.conditionalAccess.ipNamedLocation", res.__id)