Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope Tags are not being assigned. #133

Closed
Odnel opened this issue May 4, 2023 · 4 comments
Closed

Scope Tags are not being assigned. #133

Odnel opened this issue May 4, 2023 · 4 comments

Comments

@Odnel
Copy link

Odnel commented May 4, 2023

Hello!

I've recently started testing your script and I am loving it!

I've encountered strange issue when using import option.

I've tried to import a compliance policies, but each policy does not have assigned scope tag.

I am using Assign Scope (tag) option, all of the Scope Tags are present in the environment before import is done.

Logs are showing below error:
image

My assumption was lack of privileges, but app has DeviceManagementRBAC.ReadWrite.All assigned.

It seems to be similar to issue #61 , but it seems there issue was lack of Scope Tags in the tenant, which is not the case here.

Any help will be appreciated :)

@Micke-K
Copy link
Owner

Micke-K commented May 6, 2023

Hello!

Did you export the ScopeTags? Is there a folder for them in the exported folder?

You have to export dependency objects. The script will use that during import so it can eg translate a scope tag. This is required because objects will not have the same id in different environments. The dependency objects must be imported first. A full batch import will take care of that but must be done manually if importing single objects/object types.

Cheers!

@Odnel
Copy link
Author

Odnel commented May 8, 2023

Hello!

Yes, the ScopeTags were exported and they are present in the folder.

As the ScopeTags are already in the tenant I am using option "Skip if object exists" when importing the settings and I can see that ScopeTags are being read by the script (and skipped, due to being in tenant already). ScopeTags are being imported as one of the first objects.

Can this option make a difference in importing dependency objects?

For now I am testing this script on the same tenant so ScopeTags that were exported are exactly the same as in the .json files that were exported.

@Micke-K
Copy link
Owner

Micke-K commented May 8, 2023

Hello,

I'm trying to figure this one out. The image from the log makes no sense to me since that means it can't find a menu item for ScopeTags.

I did find some weirdness when importing into the same tenant.

Can you try the attached file and try again. Just replace the existing MSGraph.psm1.

If this is not working, can you attach a full log?

Cheers!

MSGraph.zip

@Odnel
Copy link
Author

Odnel commented Oct 18, 2023

Apologies for a late response. Attached file worked as expected. Thank you!

@Odnel Odnel closed this as completed Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants